summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordas <das>2009-07-18 06:55:10 (GMT)
committerdas <das>2009-07-18 06:55:10 (GMT)
commit9c0aea5b00ec4ca2994de3f86a1e39ed979dc98f (patch)
tree63f8e34e4e8af18d7df3d1b7228befacf02040ed /macosx
parent4f610a5f0cbcaef99f4dc717059838c3d387e158 (diff)
downloadtk-9c0aea5b00ec4ca2994de3f86a1e39ed979dc98f.zip
tk-9c0aea5b00ec4ca2994de3f86a1e39ed979dc98f.tar.gz
tk-9c0aea5b00ec4ca2994de3f86a1e39ed979dc98f.tar.bz2
* macosx/tkMacOSXBitmap.c: Fix tk::mac::iconBitmap crash due to
off-by-one ckalloc error. [Bug 2821318]
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXBitmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c
index c2515d3..70900a9 100644
--- a/macosx/tkMacOSXBitmap.c
+++ b/macosx/tkMacOSXBitmap.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXBitmap.c,v 1.11 2009/07/06 20:29:21 dkf Exp $
+ * RCS: @(#) $Id: tkMacOSXBitmap.c,v 1.12 2009/07/18 06:55:10 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -428,7 +428,7 @@ TkMacOSXIconBitmapObjCmd(
}
}
#endif
- ib.value = ckalloc(len);
+ ib.value = ckalloc(len + 1);
strcpy(ib.value, value);
if (!iconBitmapTable.buckets) {
Tcl_InitHashTable(&iconBitmapTable, TCL_STRING_KEYS);