Skip to content
Tcl Source Code Artifact [22ad1c705b]
Login

Artifact [22ad1c705b]

Artifact 22ad1c705beb8b32c7533a95c1db82e006d4b39b:

Ticket change [22ad1c705b] - New ticket [3118489fffffffff|3118489fff] <i>NUL in filenames</i>. by andygoth on 2010-11-25 14:51:20.
D 2010-11-25T14:51:20
J assignee vincentdarley
J cmimetype text/plain
J comment Some\sfile\scommands\streat\sNUL\s(\\0)\sas\sa\sstring\sterminator.\s\sOthers\streat\sit\sas\sa\snormal\scharacter.\s\sThis\sinconsistency\smakes\sit\spossible\sto\sspoof\scommands\sthat\sfilter\sbased\son\sfilename,\sparticularly\sextension.\s\sExample:\n\nproc\saccess\s{name}\s{\n\s\s\s\sif\s{[file\sextension\s$name]\seq\s".secret"}\s{\n\s\s\s\s\s\s\s\serror\sdenied\n\s\s\s\s}\selse\s{\n\s\s\s\s\s\s\s\sputs\sgranted\n\s\s\s\s\s\s\s\sopen\s$name\n\s\s\s\s}\n}\n%\saccess\sfile.secret\ndenied\n%\saccess\sfile.secret\\0\ngranted\nfile5\n\nGenerally,\sit's\sthe\scommands\sthat\stalk\sto\sthe\soperating\ssystem\sthat\streat\sNUL\sas\sthe\sstring\sterminator.\s\s(More\slikely\sit's\sthe\soperating\ssystem\sitself\sthat\sdoes\sthis!)\s\sFor\sexample,\s[open]\sand\s[cd]\sdo\sthis:\n\n%\scd\s.\n%\scd\s.\\0\n%\scd\s\\0.\ncouldn't\schange\sworking\sdirectory\sto\s"NUL.":\sno\ssuch\sfile\sor\sdirectory\n#\s(in\sthe\sprevious\sline,\sNUL\sis\sa\sreal\sNUL\scharacter;\sto\ssee\sit,\suse\stkcon\sinstead\sof\sxterm)\n%\sfile\sexists\s.\n1\n%\sfile\sexists\s.\\0\n1\n%\sfile\sexists\s\\0.\n0
J foundin obsolete:\s8.6b1.1
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter andygoth
J subsystem 37.\sFile\sSystem
J title NUL\sin\sfilenames
J type Bug
K 3118489fffffffffffffffffffffffffffffffff
U andygoth
Z 254c1daaae27e81e40b7db37c923e902