summaryrefslogtreecommitdiffstats
path: root/generic/tkImgGIF.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkImgGIF.c')
-rw-r--r--generic/tkImgGIF.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index 7e237fa..549a997 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -466,7 +466,13 @@ FileReadGIF(
*/
if (Fread(gifConfPtr, buf, 1, 3, chan) != 3) {
- return TCL_OK;
+ /*
+ * Bug [865af0148c]: 3 bytes should be there, but data ended before
+ */
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "GIF file truncated", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "TRUNCATED", NULL);
+ return TCL_ERROR;
}
bitPixel = 2 << (buf[0] & 0x07);