Skip to content
Tcl Source Code Artifact [7037472277]
Login

Artifact [7037472277]

Artifact 7037472277487c237927bd6878377de7bdb53df0e40898a8489197d9c6a8529b:

Ticket change [7037472277] - Ticket [c9e68eb6ca40bb84|c9e68eb6ca] <i>tclEncoding.c: undefined behavior involving NULL pointers</i> status still Open with 3 other changes by apnadkarni on 2025-09-21 17:02:15.
D 2025-09-21T17:02:15.773
J icomment Examining\sthe\scode,\sseems\sthe\sissue\sis\swith\stclUnixInit.c\snot\schecking\sthe\sreturn\svalue\sfrom\s`getenv`\sand\spassing\sthe\sNULL\sresult\sinto\sthe\sdecoding\sroutines.\sAnd\slooking\sat\sthe\sWindows\sversion,\sthat\stoo\signores\sthe\sstatus\scode\sof\s`GetEnvironmentVariable`\sas\swell\sas\sthe\sstatus\scode\sfrom\ssubsequent\sWideCharToMultiByte().\sThe\sdifference\sis\sthat\sbecause\sof\sthe\sdiffering\sAPI\s(GetEnvironmentVariable\saccepts\san\soutput\sbuffer\sinstead\sof\sreturning\sa\spointer),\swhat\sis\spassed\sinto\sthe\sdecoding\sroutines\sis\snot\sNULL\sbut\sa\spointer\sto\scomplete\sgarbage.\sStuff\sworks\sbecause\sgarbage\spath\sdoes\snot\sexist\sand\sTcl\sfalls\sback\sto\slooking\sinto\sthe\sparent\sdirectory\sof\sthe\sexecutable.\r\n\r\nDefinitely\ssomething\sin\sneed\sof\sfixing\sbut\snot\sin\sthe\sencoding\sroutines.\r\n\r\nThanks\sfor\sreporting.
J login apnadkarni
J mimetype text/x-markdown
K c9e68eb6ca40bb844b6c5d172a8e203f4b419857
U apnadkarni
Z 558a28e990465c87640def87ad76cb8b