diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-05-19 15:05:42 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-05-19 15:05:42 (GMT) |
commit | d307130311321b2d327d13669905d9873b5863d3 (patch) | |
tree | d55252bbc32350f5f58b3284def964d2644112e7 /generic/tclStringObj.c | |
parent | 59f20f23bdf80b9aa0106269a64e16715a0deb2c (diff) | |
parent | 53a20bbf1cf609252a8ec050ed68a139687e7ad0 (diff) | |
download | tcl-d307130311321b2d327d13669905d9873b5863d3.zip tcl-d307130311321b2d327d13669905d9873b5863d3.tar.gz tcl-d307130311321b2d327d13669905d9873b5863d3.tar.bz2 |
Merge 9.0
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r-- | generic/tclStringObj.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 61f566a..9f048d3 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -691,6 +691,10 @@ TclGetUnicodeFromObj( } if (lengthPtr != NULL) { + if (stringPtr->numChars > INT_MAX) { + Tcl_Panic("Tcl_GetUnicodeFromObj with 'int' lengthPtr" + "cannot handle such long strings. Please use 'size_t'"); + } *lengthPtr = (int)stringPtr->numChars; } return stringPtr->unicode; |