Skip to content
Tcl Source Code Artifact [3a88712452]
Login

Artifact [3a88712452]

Artifact 3a88712452e4ae20b730b66af934803a8753c1c2:

Ticket change [3a88712452] - New ticket [2107634fffffffff|2107634fff] <i>extend maximum command length to maxint</i>. by brlcad on 2008-09-12 15:20:03.
D 2008-09-12T15:20:03
J assignee msofer
J cmimetype text/plain
J comment We\sran\sinto\sa\sproblem\sin\sBRL-CAD\swith\sthe\smaximum\scommand\slength\sin\sTcl\sand\shave\sa\sfix\sthat\sextends\sthe\smaximum\scommand\slimit\sapproximately\stwo\stimes\swhere\sit\spresently\sfails.\s\sThe\sprovided\spatch\spushes\sthat\slimit\sup\sabout\s2x\sby\schecking\sfor\sthe\soverflow\sand\sclamping\sto\smaxint.\s\sIf\sthat\smaxint\slimit\sis\sexceeded,\sthen\sit\snow\sreturns\s-1\sinstead\sof\scrashing\stoo.\n\nThe\scurrent\sbehavior\swithout\sthe\spatch\sis\sthat\s'length'\sends\sup\soverflowing\scausing\sa\scrash\sinside\sTcl_SetObjLength()\swhere\sit\stries\sto\suse\slength\s(which\sis\snegative\smaxint)\sas\san\sarray\sindex.\n\nFor\sthose\swondering\sjust\show\swe'd\sactually\sblow\sout\sthat\slimit,\sour\s(.asc)\sASCII\sfile\sformat\sin\sBRL-CAD\sis\sessentially\sa\sTcl\stranscript.\s\sSo\sto\sload\sa\sfile,\swe\sjust\shave\sTcl\sparse\sthe\sfile.\s\sBeing\sa\sCAD\spackage,\sour\sfiles\sare\sgeometry.\s\sOne\sof\sthe\sgeometry\stypes\sis\sa\spolygonal\smesh...\sSo\swhen\syou\shave\sone\smesh\sthat\sis\sreally\sbig\s(which\sis\sreally\seasy\sto\sdo),\syou\send\sup\sblowing\sout\sthe\scommand\slength.\n\nThis\sfix\sshould\sbe\scredited\sto\sBob\sParker\s(BRL-CAD\sdeveloper)\sif\sit\sis\sapplied.\s\sThe\spatch\swas\smade\sagainst\s8.5.1\n\nWe\sfully\sadmit\sthat\sthe\spatch\sisn't\sideal,\sbut\sit\sdoes\sresolve\sthe\sproblem\sfrom\sour\sstandpoint\swithout\sany\snegative\sconsequences\suntil\sthe\sAPI\scan\sbe\simproved.\s\sAs\syou're\sundoubtedly\swell-aware,\sDoReadChars()\sand\sfriends\sneed\sto\snot\suse\sint\severywhere\sfor\sstring/buffer\slength\stracking,\sinstead\susing\ssize_t's\sor\ssomething\ssimilarly\slonger\s(and\sfixed)\sinstead\sof\sint.\n\nCheers!\nSean\n\n
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter brlcad
J subsystem 45.\sParsing\sand\sEval
J title extend\smaximum\scommand\slength\sto\smaxint
J type Patch
K 2107634fffffffffffffffffffffffffffffffff
U brlcad
Z e258587eda0a8fc310944f0e4dd13104