blob: 0dc8e6ad7ccab284d3847759015cb57c9b69572e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
--- tk/generic/tkImgGIF.c.orig 2008-02-09 16:44:04.000000000 -0800
+++ tk/generic/tkImgGIF.c 2008-02-09 16:47:47.000000000 -0800
@@ -804,6 +804,12 @@
Tcl_PosixError(interp), (char *) NULL);
return TCL_ERROR;
}
+
+ if (initialCodeSize > MAX_LWZ_BITS) {
+ Tcl_SetResult(interp, "malformed image", TCL_STATIC);
+ return TCL_ERROR;
+ }
+
if (transparent!=-1) {
cmap[transparent][CM_RED] = 0;
cmap[transparent][CM_GREEN] = 0;
|