Jan Engelhardt
309fc5c36e
- Add CVE-2019-13616.patch: fix heap buffer overflow when reading a crafted bmp file (boo#1141844 CVE-2019-13616). OBS-URL: https://build.opensuse.org/request/show/725424 OBS-URL: https://build.opensuse.org/package/show/games/SDL_image?expand=0&rev=23
16 lines
467 B
Diff
16 lines
467 B
Diff
diff -r 9ccaa3a0dfb6 -r a59bfe382008 IMG_bmp.c
|
|
--- a/IMG_bmp.c Thu Jul 11 01:01:56 2019 +0300
|
|
+++ b/IMG_bmp.c Tue Jul 30 21:29:15 2019 +0300
|
|
@@ -272,6 +272,11 @@
|
|
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;
|