Skip to content
Tcl Source Code Artifact [32d512be5b]
Login

Artifact [32d512be5b]

Artifact 32d512be5bb9e41561b12be67c5d6d27f5dcabae:

Ticket change [32d512be5b] - New ticket [219012ffffffffff|219012ffff] <i>tmpnam limitation</i>. by nobody on 2000-10-26 01:09:18.
D 2000-10-26T01:09:18
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s3911\sBug\nVersion:\s8.2\nSubmitDate:\s'1999-12-21'\nLastModified:\s'2000-03-31'\nSeverity:\sSER\nStatus:\sReleased\nSubmitter:\stechsupp\nChangedBy:\sericm\nOS:\sLinux\nMachine:\sIBM\sPC/AT\scompatible\nFixedDate:\s'2000-03-31'\nFixedInVersion:\s8.3.1\nClosedDate:\s'2000-10-25'\n\n\nName:\nHiroshi\sKasai\n\nCustomShell:\nJP\spatch\n\nComments:\nPrecisely,\sI\sfound\sthis\sbug\sin\stcl7.6.\sBut,\sit\sis\ssame\sas\sin\stcl8.2.\n\nIf\syou\suse\sa\sfunction\s'exec'\sor\s'open\s"|..."',\stcl\scalls\sa\sfunction\s'tmpnam'.\sThis\sfunction\shas\sa\slimitation.\nIt\sis\sdefined\sin\sstdio.h\sas\n#define\sTMP_MAX\s238328\nThis\sis\sa\smaximum\snumber\sof\scalls\sfor\sthe\sfunction\s'tmpnam'.\nIf\sit\sgets\sover,\sthe\sfunction\sreturns\sNULL.\sBut,\sthe\sfunction\sis\sused\sas\n\nchar\sfileName[L_tmpnam];\s\n\ntmpnam(fileName);\s\n\nThe\s'fileName'\sis\slocal\svariable.\sSo,\sif\s'tmpnam'\sreturned\sNULL,\s'fileName'\svalue\sis\snot\schanged.\nAnd\smore,\sthe\svariable\sis\snot\sinitialized\sbecause\sit\sis\slocal,\nNothing\shappens\sif\sit\sis\slucky.An\serror\sis\sindicated\sif\sit\shas\sbad\sluck\sa\slittle.\nWhen\sit\sis\sthe\sworst,\sif\sthe\svariable\shas\sa\sexist\sfile\sname,\sthe\sfile\sis\sdestroyed.\nIt\sis\sto\sredirect\sstandard\serror\soutput\sspecifically\sto\savoid\sthis.\n\nReproducibleScript:\nopen\s"|command"\nexec\scommand\n\nObservedBehavior:\ncouldn't\screate\serror\sfile\s:\sno\ssuch\sfile\sor\sdirectory\n\n\n\nThanks\sfor\spointing\sthis\sout.\s\sI\sadded\sa\stest\sfor\sa\sNULL\sreturn\sfrom\stmpnam,\swhich\swill\ssolve\sthis\sproblem\son\sLinux\sand\sshould\sbe\snon-harmful\son\sother\sUNIX\s(Solaris\sand\sHP-UX\sboth\sfollow\sa\sdifferent\sconvention\swhen\sTMP_MAX\sis\sexceeded).\s\sThis\sfix\swill\sgo\sout\swith\s8.3.1.\n\n-\seric\n\n--\s03/31/2000\sericm\n\n
J foundin obsolete:\s8.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 60.\sNRE\sand\scoroutines
J title tmpnam\slimitation
J type Bug
K 219012ffffffffffffffffffffffffffffffffff
U nobody
Z af46a7493b18ac6d41aa3998fa7cc60e