- 264 license table entries with exact download URLs (224/264 resolved) - Complete sources/ directory with all BitBake recipes - Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl) - Full traceability for Softwarefreigabeantrag - GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4 - License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
30 lines
875 B
Diff
30 lines
875 B
Diff
From 97fefd050976bbbfca9608499f6a7d9fb86e70db Mon Sep 17 00:00:00 2001
|
|
From: Sam Lantinga <slouken@libsdl.org>
|
|
Date: Tue, 30 Jul 2019 11:00:00 -0700
|
|
Subject: [PATCH] Fixed bug 4538 - validate image size when loading BMP files
|
|
---
|
|
Upstream-Status: Pending
|
|
|
|
src/video/SDL_bmp.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c
|
|
index 8eadc5f..5b5e12c 100644
|
|
--- a/src/video/SDL_bmp.c
|
|
+++ b/src/video/SDL_bmp.c
|
|
@@ -143,6 +143,11 @@ SDL_Surface * SDL_LoadBMP_RW (SDL_RWops *src, int freesrc)
|
|
(void) biYPelsPerMeter;
|
|
(void) biClrImportant;
|
|
|
|
+ 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;
|
|
--
|
|
2.25.1
|
|
|