<i>FilterInputBytes(): signed integer overflow, poor worst-case performance lengthening objPtr</i> status still Open with 4 other changes
by
.
D 2026-10-18T16:44:59.176
J foundin 8.6.18,\s9.1.0
J icomment Still\spresent\sin\s9.1\s(9.0\shas\sthe\ssame\scode):\s<tt>Tcl_GetsObj()</tt>,\s<tt>TclGetsObjBinary()</tt>\sand\s<tt>FilterInputBytes()</tt>\skeep\soffsets\sand\scounts\sin\s<tt>int</tt>,\sso\s<nowiki>[gets]</nowiki>\sof\sa\sline\sover\s2\sGB\spanics\sin\s<tt>Tcl_SetObjLength</tt>\s("length\srequested\sis\snegative"),\sreturns\sa\snegative\slength\swith\s<tt>-translation\sbinary</tt>,\sor\scrashes\swhen\sa\s<tt>\\r</tt>\sends\sa\sbuffer.\n\nProposed\sfix\sin\sbranch\s[/timeline?r=gets-long-lines|gets-long-lines]:\s<tt>Tcl_Size</tt>\sthere,\sand\sthe\sdoubling\sof\sthe\sbuffer\sno\slonger\soverflows.\sTests\sgets-bigdata-1\sto\s3\s(constraint\s<tt>bigdata</tt>,\sabout\s6\sGB\sof\smemory).\sThe\sgrowth\sstrategy\swhen\sdoubling\sfails\sis\sunchanged.
J login serhiy.storchaka
J mimetype text/x-fossil-wiki
K 69b4f7eb379e7b806c0c144a36059ca55f569634
U serhiy.storchaka
Z 9ba9673bedf579e21c012739c404a61d