From a8d8732c51b3f6bcdc52a093aa0b987a120ad9fe Mon Sep 17 00:00:00 2001 From: oehhar Date: Thu, 9 Jun 2022 13:06:29 +0000 Subject: GIF read: honor that "Plain Text Extension" limits the scope of a "Graphic Control Extension", reset saved information --- generic/tkImgGIF.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c index 594ec1e..f0ac047 100644 --- a/generic/tkImgGIF.c +++ b/generic/tkImgGIF.c @@ -1067,7 +1067,12 @@ DoExtension( switch (label) { case 0x01: /* Plain Text Extension */ - /* this extension is ignored, skip below */ + /* + * This extension starts a new scope, so Graphic control Extension + * data should be cleared + */ + *transparent = -1; + /* this extension is ignored, skip below */ break; case 0xf9: /* Graphic Control Extension */ count = GetDataBlock(gifConfPtr, chan, buf); -- cgit v0.12