Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pkgs/by-name/gi/giflib/CVE-2025-31344.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/gif2rgb.c b/gif2rgb.c
index d51226d..4ce2104 100644
--- a/gif2rgb.c
+++ b/gif2rgb.c
@@ -329,6 +329,11 @@ static void DumpScreen2RGB(char *FileName, int OneFileFlag,
GifRow = ScreenBuffer[i];
GifQprintf("\b\b\b\b%-4d", ScreenHeight - i);
for (j = 0; j < ScreenWidth; j++) {
+ /* Check if color is within color palete */
+ if (GifRow[j] >= ColorMap->ColorCount) {
+ GIF_EXIT(GifErrorString(
+ D_GIF_ERR_IMAGE_DEFECT));
+ }
ColorMapEntry = &ColorMap->Colors[GifRow[j]];
Buffers[0][j] = ColorMapEntry->Red;
Buffers[1][j] = ColorMapEntry->Green;
1 change: 1 addition & 0 deletions pkgs/by-name/gi/giflib/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
patches =
[
./CVE-2021-40633.patch
./CVE-2025-31344.patch
]
++ lib.optionals stdenv.hostPlatform.isMinGW [
# Build dll libraries.
Expand Down