diff options
author | das <das@noemail.net> | 2009-05-06 16:36:27 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2009-05-06 16:36:27 (GMT) |
commit | 8500b7b2fe4c200d8deac29a1f552e86966aea2c (patch) | |
tree | 66544cca926556c8357866f9946a4a4fe88cef64 | |
parent | 0ebfb95716af2b04019a989e764152fc67670d87 (diff) | |
download | tk-8500b7b2fe4c200d8deac29a1f552e86966aea2c.zip tk-8500b7b2fe4c200d8deac29a1f552e86966aea2c.tar.gz tk-8500b7b2fe4c200d8deac29a1f552e86966aea2c.tar.bz2 |
avoid panic for CFStrings longer than INT_MAX
FossilOrigin-Name: a4e83967a6980a6e62185a19a8f877b5eaa3ad45
-rw-r--r-- | macosx/tkMacOSXInit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index e54938b..2eaa883 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXInit.c,v 1.34.2.2 2008/06/19 00:13:10 das Exp $ + * RCS: @(#) $Id: tkMacOSXInit.c,v 1.34.2.3 2009/05/06 16:36:28 das Exp $ */ #include "tkMacOSXPrivate.h" @@ -584,7 +584,7 @@ TkMacOSXGetStringObjFromCFString( CFIndex len; if (CFStringGetBytes(str, all, kCFStringEncodingUTF8, 0, false, NULL, - 0, &len) > 0) { + 0, &len) > 0 && len < INT_MAX) { obj = Tcl_NewObj(); Tcl_SetObjLength(obj, len); CFStringGetBytes(str, all, kCFStringEncodingUTF8, 0, false, |