summaryrefslogtreecommitdiff
path: root/tk/mac/tkMacDraw.c
diff options
context:
space:
mode:
Diffstat (limited to 'tk/mac/tkMacDraw.c')
-rw-r--r--tk/mac/tkMacDraw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tk/mac/tkMacDraw.c b/tk/mac/tkMacDraw.c
index 0b4a130c28c..8e659e9c1eb 100644
--- a/tk/mac/tkMacDraw.c
+++ b/tk/mac/tkMacDraw.c
@@ -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,
@@ -1191,4 +1194,3 @@ TkpDrawHighlightBorder (
}
}
}
-