summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/freeimage-CVE-2020-21428.patch
diff options
context:
space:
mode:
authorJohn Kehayias <john.kehayias@protonmail.com>2023-12-21 14:30:55 -0500
committerJohn Kehayias <john.kehayias@protonmail.com>2023-12-21 14:30:55 -0500
commitf7bca895b91c4e12324f34311e312ace2835e0df (patch)
treefbd79597d1d6c9c17faf72431660fa71286037ae /gnu/packages/patches/freeimage-CVE-2020-21428.patch
parentebd3b3e9020f978e65f7be7f4eb0ffff9bbca31f (diff)
parent04b63ea195cbcbcf519b7dd52546c6d56be6741b (diff)
Merge branch 'master' into mesa-updates
Change-Id: Icf1dd47b3e0780d16887014bdacb0dbc891bfec5
Diffstat (limited to 'gnu/packages/patches/freeimage-CVE-2020-21428.patch')
-rw-r--r--gnu/packages/patches/freeimage-CVE-2020-21428.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/gnu/packages/patches/freeimage-CVE-2020-21428.patch b/gnu/packages/patches/freeimage-CVE-2020-21428.patch
new file mode 100644
index 0000000000..49f427360b
--- /dev/null
+++ b/gnu/packages/patches/freeimage-CVE-2020-21428.patch
@@ -0,0 +1,17 @@
+https://sources.debian.org/data/main/f/freeimage/3.18.0%2Bds2-10/debian/patches/r1877-improved-DDS-plugin-against-malicious-images.patch
+
+Origin: upstream, r1877
+Index: Source/FreeImage/PluginDDS.cpp
+===================================================================
+diff --git a/Source/FreeImage/PluginDDS.cpp b/Source/FreeImage/PluginDDS.cpp
+--- a/Source/FreeImage/PluginDDS.cpp (revision 1876)
++++ b/Source/FreeImage/PluginDDS.cpp (revision 1877)
+@@ -617,7 +617,7 @@
+ // read the file
+ // -------------------------------------------------------------------------
+
+- const int line = CalculateLine(width, bpp);
++ const int line = CalculateLine(width, FreeImage_GetBPP(dib));
+ const int filePitch = ((desc->dwFlags & DDSD_PITCH) == DDSD_PITCH) ? (int)desc->dwPitchOrLinearSize : line;
+ const long delta = (long)filePitch - (long)line;
+