aboutsummaryrefslogtreecommitdiffstats
path: root/main/sdl_image/CVE-2019-13616.patch
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-11-20 11:44:53 +0100
committerLeo <thinkabit.ukim@gmail.com>2019-11-20 11:52:48 +0100
commite744b4cb5b3ab1bdb7a54cbe834a92b5c12e6778 (patch)
treea2fb2d03311b456972abf9c620344d367a8a9fb8 /main/sdl_image/CVE-2019-13616.patch
parent170d58419994a0fb495972beef8ef4b82bdc966c (diff)
downloadaports-e744b4cb5b3ab1bdb7a54cbe834a92b5c12e6778.tar.gz
aports-e744b4cb5b3ab1bdb7a54cbe834a92b5c12e6778.tar.bz2
aports-e744b4cb5b3ab1bdb7a54cbe834a92b5c12e6778.tar.xz
main/sdl_image: fix CVE-2019-13616
ref #10878
Diffstat (limited to 'main/sdl_image/CVE-2019-13616.patch')
-rw-r--r--main/sdl_image/CVE-2019-13616.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/main/sdl_image/CVE-2019-13616.patch b/main/sdl_image/CVE-2019-13616.patch
new file mode 100644
index 0000000000..f2ed7c6aa0
--- /dev/null
+++ b/main/sdl_image/CVE-2019-13616.patch
@@ -0,0 +1,16 @@
+diff --git a/IMG_bmp.c b/IMG_bmp.c
+index b3c7580..bfadd45 100644
+--- a/IMG_bmp.c
++++ b/IMG_bmp.c
+@@ -272,6 +272,11 @@ static SDL_Surface *LoadBMP_RW (SDL_RWops *src, int freesrc)
+ biClrUsed = SDL_ReadLE32(src);
+ biClrImportant = SDL_ReadLE32(src);
+ }
++ if (biWidth <= 0 || biHeight == 0) {
++ IMG_SetError("BMP file with bad dimensions (%dx%d)", biWidth, biHeight);
++ was_error = SDL_TRUE;
++ goto done;
++ }
+ if (biHeight < 0) {
+ topDown = SDL_TRUE;
+ biHeight = -biHeight;