From 9c0aea5b00ec4ca2994de3f86a1e39ed979dc98f Mon Sep 17 00:00:00 2001 From: das Date: Sat, 18 Jul 2009 06:55:10 +0000 Subject: * macosx/tkMacOSXBitmap.c: Fix tk::mac::iconBitmap crash due to off-by-one ckalloc error. [Bug 2821318] --- ChangeLog | 5 +++++ macosx/tkMacOSXBitmap.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee9f6c5..338c778 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-18 Daniel Steffen + + * macosx/tkMacOSXBitmap.c: Fix tk::mac::iconBitmap crash due to + off-by-one ckalloc error. [Bug 2821318] + 2009-07-15 Daniel Steffen * macosx/ttkMacOSXTheme.c: Update notebook tab appearance to 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); -- cgit v0.12