diff --git a/CVE-2021-40633.patch b/CVE-2021-40633.patch new file mode 100644 index 0000000000000000000000000000000000000000..80f10f0a42f8672999b23613e8e86de1a3999f52 --- /dev/null +++ b/CVE-2021-40633.patch @@ -0,0 +1,13 @@ +diff -urN giflib-5.2.1/gif2rgb.c giflib-5.2.1-bak/gif2rgb.c +--- giflib-5.2.1/gif2rgb.c 2024-05-14 16:38:28.259385838 +0800 ++++ giflib-5.2.1-bak/gif2rgb.c 2024-05-14 16:40:04.629090800 +0800 +@@ -498,6 +498,9 @@ + ScreenBuffer, + GifFile->SWidth, GifFile->SHeight); + ++ for (i = 0; i < GifFile->SHeight; i++) { ++ (void)free(ScreenBuffer[i]); ++ } + (void)free(ScreenBuffer); + + if (DGifCloseFile(GifFile, &Error) == GIF_ERROR) { diff --git a/giflib.spec b/giflib.spec index 06507c8ef836fd6981639abcc7058461258a51b5..be94232bef1b5d59e0b3fc63479a4dd88647b0e7 100644 --- a/giflib.spec +++ b/giflib.spec @@ -2,7 +2,7 @@ Name: giflib Version: 5.2.1 -Release: 7 +Release: 8 Summary: A library and utilities for processing GIFs License: MIT URL: http://www.sourceforge.net/projects/giflib/ @@ -16,6 +16,7 @@ Patch1:giflib_coverity.patch Patch2:giflib_html-docs-consistent-ids.patch Patch3:CVE-2022-28506.patch Patch4:CVE-2023-39742.patch +Patch5:CVE-2021-40633.patch BuildRequires: make xmlto gcc provides: giflib-utils @@ -75,6 +76,9 @@ rm -f %{buildroot}/debugsourcefiles.list %{_bindir}/gif* %changelog +* Tue May 14 2024 liwenjie - 5.2.1-8 +- Fix CVE-2021-40633 + * Fri Sep 15 2023 Funda Wang - 5.2.1-7 - Fix CVE-2023-39742