|
2023-07-05
| ||
| 10:09 | • Closed ticket [819f704053]: TclGetUnicodeFromObj doesn't handle numChars >... artifact: db9819b4f6 user: apnadkarni | |
|
2021-11-06
| ||
| 18:11 | • New ticket [819f704053]. artifact: 5648b319c4 user: dgp | |
TclGetUnicodeFromObj doesn't handle numChars > INT_MAX
Closed / Fixed819f7040535f7f1c9857d447680fda1df83c48c3Created 5 years agoUpdated 3 years ago
Descriptionplain2021-11-06 18:11:11
Line 617 of tclStringObj.c:
*lengthPtr = (int)stringPtr->numChars;
The cast might make type-checking compilers happy,
but it will not handle the case when stringPtr->numChars > INT_MAX
in any way that can be considered sensible.
My first guess is we ought to panic. You can't use a constrained
interface to fetch a value not within that constraint.
apnadkarniplain2023-07-05 10:09:45
Closing because seems to have been fixed (check added).
Log in (anonymous is fine) to add a comment.