summaryrefslogtreecommitdiffstats
path: root/generic/tkImgGIF.c
diff options
context:
space:
mode:
authorrmax <rmax>2007-09-11 18:01:45 (GMT)
committerrmax <rmax>2007-09-11 18:01:45 (GMT)
commit7548e69f75b914997b3a2f1f0404eb7693b426d1 (patch)
tree43e8911e117b031a2199690827934e981b0f9df7 /generic/tkImgGIF.c
parentd13d64c12f225e321c7028a569483d75917cff0f (diff)
downloadtk-7548e69f75b914997b3a2f1f0404eb7693b426d1.zip
tk-7548e69f75b914997b3a2f1f0404eb7693b426d1.tar.gz
tk-7548e69f75b914997b3a2f1f0404eb7693b426d1.tar.bz2
* generic/tkImgGIF.c: Fixed a buffer overrun that got triggered by
multi-frame interlaced GIFs that contain subsequent frames that are smaller than the first one. * tests/imgPhoto.test: Added a test for the above.
Diffstat (limited to 'generic/tkImgGIF.c')
-rw-r--r--generic/tkImgGIF.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index d4e5d39..c8588bc 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -29,7 +29,7 @@
* | provided "as is" without express or implied warranty. |
* +-------------------------------------------------------------------+
*
- * RCS: @(#) $Id: tkImgGIF.c,v 1.24.2.4 2006/03/27 12:13:56 dkf Exp $
+ * RCS: @(#) $Id: tkImgGIF.c,v 1.24.2.5 2007/09/11 18:01:45 rmax Exp $
*/
/*
@@ -995,7 +995,7 @@ ReadImage(interp, imagePtr, chan, len, rows, cmap,
*/
if (interlace) {
ypos += interlaceStep[pass];
- while (ypos >= height) {
+ while (ypos >= rows) {
pass++;
if (pass > 3) {
return TCL_OK;