summaryrefslogtreecommitdiffstats
path: root/mac/tkMacDraw.c
diff options
context:
space:
mode:
authordas <das>2002-04-08 09:04:31 (GMT)
committerdas <das>2002-04-08 09:04:31 (GMT)
commit2024eae67e8a0249d280bd2f8423ecd91033040b (patch)
tree388b7f23b6b3cafb2c20243044e6b0a315a7ec0f /mac/tkMacDraw.c
parentedf6ae717ffa12d49b2c5163c7d44c7fa3693020 (diff)
downloadtk-2024eae67e8a0249d280bd2f8423ecd91033040b.zip
tk-2024eae67e8a0249d280bd2f8423ecd91033040b.tar.gz
tk-2024eae67e8a0249d280bd2f8423ecd91033040b.tar.bz2
2002-04-08 Daniel Steffen <das@users.sourceforge.net>
* mac/tkMacProjects.sea.hqx: added tkPanedWindow.c to projects * mac/tkMacAppInit.c: fixes to MSL stdin/stdout hookup to the TkConsole when using shared MSL libraries; fix for crashing bug on exit: writing to stdin/sterr when console has already been destroyed. (both fixes need support in MSL, see 'CW Pro6 changes' in tcl/mac/tcltkMacBuildSupport.sea.hqx) * mac/tkMacDialog.c: fixes to Navigation Services Dialog filter. * mac/tkMacDraw.c: add panic for overwide TkImages that would crash Tk on mac otherwise.
Diffstat (limited to 'mac/tkMacDraw.c')
-rw-r--r--mac/tkMacDraw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mac/tkMacDraw.c b/mac/tkMacDraw.c
index f684976..f3af2fc 100644
--- a/mac/tkMacDraw.c
+++ b/mac/tkMacDraw.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: tkMacDraw.c,v 1.8 1999/12/14 06:52:56 hobbs Exp $
+ * RCS: @(#) $Id: tkMacDraw.c,v 1.9 2002/04/08 09:04:43 das Exp $
*/
#include "tkInt.h"
@@ -370,6 +370,9 @@ TkPutImage(
pixmap.pmTable = NULL;
pixmap.pmReserved = 0;
pixmap.baseAddr = image->data;
+ if (image->bytes_per_line >= 0x4000) {
+ panic("TkImage too wide!");
+ }
pixmap.rowBytes = image->bytes_per_line | 0x8000;
CopyBits((BitMap *) &pixmap, &((GrafPtr) destPort)->portBits,