forked from jengelh/SDL2
Jan Engelhardt
49aed970ee
- Add CVE-2019-13616.patch: fix heap buffer overflow when reading a crafted bmp file (boo#1141844 CVE-2019-13616). potential security exploits (boo#1142031 CVE-2019-13626) OBS-URL: https://build.opensuse.org/request/show/725412 OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=89
16 lines
543 B
Diff
16 lines
543 B
Diff
diff -r b810b78d32cc -r e7ba650a643a src/video/SDL_bmp.c
|
|
--- a/src/video/SDL_bmp.c Thu Jul 25 08:05:13 2019 -0500
|
|
+++ b/src/video/SDL_bmp.c Tue Jul 30 11:00:00 2019 -0700
|
|
@@ -226,6 +226,11 @@
|
|
SDL_RWseek(src, (biSize - headerSize), RW_SEEK_CUR);
|
|
}
|
|
}
|
|
+ if (biWidth <= 0 || biHeight == 0) {
|
|
+ SDL_SetError("BMP file with bad dimensions (%dx%d)", biWidth, biHeight);
|
|
+ was_error = SDL_TRUE;
|
|
+ goto done;
|
|
+ }
|
|
if (biHeight < 0) {
|
|
topDown = SDL_TRUE;
|
|
biHeight = -biHeight;
|