diff options
Diffstat (limited to 'community/sdl_image/CVE-2019-13616.patch')
-rw-r--r-- | community/sdl_image/CVE-2019-13616.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/community/sdl_image/CVE-2019-13616.patch b/community/sdl_image/CVE-2019-13616.patch new file mode 100644 index 0000000000..f2ed7c6aa0 --- /dev/null +++ b/community/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; |