<i>Tcl_NumUtfChars(...) no overflow check</i> status still Open with 7 other changes
by
.
D 2017-06-08T12:26:18.326
J closer nobody
J comment Tcl_NumUtfChars(unicode,\s-1)\scan\sreturn\snegative\r\ncounts\sif\sthere\sare\sreally\smore\sthan\sINT_MAX\sUtf\r\nchars\slocated\sat\sunicode\sbefore\sa\sterminating\s\\0\r\nis\sseen.\r\n\r\nIn\saddition,\sthere\sis\sanother\soverflow\sproblem,\se.g.\r\nTcl_NumUtfChars("\\xE2\\x82\\xAC",\s2):\sThis\scall\sreturns\r\n1\sinstead\sof\sthe\sexpected\s2.
J icomment Problem\swith\sthe\sTcl_NumUtfChars("\\xE2\\x82\\xAC",\s2)\scall\sis\sthat\r\nthe\s3th\sbyte\sis\sread,\seven\sthough\sa\slength\sof\sonly\s2\sbytes\swas\r\nrequested.\sSince\swith\sonly\s2\sbytes,\sthe\sunicode\scharacter\sis\r\nincomplete,\sTcl_NumUtfChars()\sshould\scount\sthis\sas\s2\sseparate\sbytes.
J login jan.nijtmans
J mimetype text/plain
J severity Minor
J title Tcl_NumUtfChars(...)\sno\soverflow\scheck
K 2738427fffffffffffffffffffffffffffffffff
U jan.nijtmans
Z 115bc60b288741531744ab314087e497