summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorrmax <rmax>2007-09-11 18:01:45 (GMT)
committerrmax <rmax>2007-09-11 18:01:45 (GMT)
commita031afb7b2e2142bb387cdd3c22f130ce6080890 (patch)
tree43e8911e117b031a2199690827934e981b0f9df7 /generic
parent5b120a5094c102be3b3eef3d62cdd9680921c5f0 (diff)
downloadtk-a031afb7b2e2142bb387cdd3c22f130ce6080890.zip
tk-a031afb7b2e2142bb387cdd3c22f130ce6080890.tar.gz
tk-a031afb7b2e2142bb387cdd3c22f130ce6080890.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')
-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;