Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > dbf547e3e374135fd899a77ae8d7f956 > files > 1

perl-Tk-804.027-7.1mdv2008.0.src.rpm

--- pTk/mTk/additions/imgGIF.c
+++ pTk/mTk/additions/imgGIF.c
@@ -776,7 +776,7 @@
     /*
      *  Initialize the decoder
      */
-    if (! ReadOK(handle,&initialCodeSize,1))  {
+    if (! ReadOK(handle,&initialCodeSize,1) || initialCodeSize > MAX_LWZ_BITS)  {
 	Tcl_AppendResult(interp, "error reading GIF image: ",
 		Tcl_PosixError(interp), (char *) NULL);
 	return TCL_ERROR;
--- pTk/mTk/generic/tkImgGIF.c
+++ pTk/mTk/generic/tkImgGIF.c
@@ -826,7 +826,7 @@
     /*
      *  Initialize the decoder
      */
-    if (! ReadOK(chan, &initialCodeSize, 1))  {
+    if (! ReadOK(chan, &initialCodeSize, 1) || initialCodeSize > MAX_LWZ_BITS)  {
 	Tcl_AppendResult(interp, "error reading GIF image: ",
 		Tcl_PosixError(interp), (char *) NULL);
 	return TCL_ERROR;