giflib/CVE-2021-40633.patch

14 lines
445 B
Diff
Raw Normal View History

diff -urN giflib-5.2.2/gif2rgb.c giflib-5.2.2-bak/gif2rgb.c
--- giflib-5.2.2/gif2rgb.c 2024-05-14 16:06:40.098092160 +0800
+++ giflib-5.2.2-bak/gif2rgb.c 2024-05-14 15:53:42.426757251 +0800
@@ -525,6 +525,9 @@
DumpScreen2RGB(OutFileName, OneFileFlag, ColorMap, ScreenBuffer,
GifFile->SWidth, GifFile->SHeight);
2024-05-14 18:10:33 +08:00
+ for (i = 0; i < GifFile->SHeight; i++) {
+ (void)free(ScreenBuffer[i]);
+ }
(void)free(ScreenBuffer);
2024-05-14 18:10:33 +08:00
{