@@ -29,8 +29,11 @@ https://bugzilla.libsdl.org/show_bug.cgi?id=4497
Signed-off-by: Petr Písař <ppisar@redhat.com>
+Also includes the follow-up fix from upstream commit 267d102f6e9c
+("fix copy+paste mistakes in commit 9b0e5c555c0f (CVE-2019-7637 fix)").
+
CVE: CVE-2019-7637
-Upstream-Status: Backport [https://github.com/libsdl-org/SDL-1.2/commit/40d97bfe0e3dae1d6e5a91a46af1f15e8f967bc8]
+Upstream-Status: Backport [https://github.com/libsdl-org/SDL-1.2/commit/40d97bfe0e3dae1d6e5a91a46af1f15e8f967bc8 https://github.com/libsdl-org/SDL-1.2/commit/267d102f6e9ce32878a6251d5136b176fdd2d49e]
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
diff -r 4646533663ae -r 9b0e5c555c0f src/video/SDL_pixels.c
@@ -104,7 +107,7 @@ diff -r 4646533663ae -r 9b0e5c555c0f src/video/gapi/SDL_gapivideo.c
video->w = gapi->w = width;
video->h = gapi->h = height;
video->pitch = SDL_CalculatePitch(video);
-+ if (!current->pitch) {
++ if (!video->pitch) {
+ return(NULL);
+ }
@@ -157,7 +160,7 @@ diff -r 4646533663ae -r 9b0e5c555c0f src/video/windib/SDL_dibvideo.c
video->w = width;
video->h = height;
video->pitch = SDL_CalculatePitch(video);
-+ if (!current->pitch) {
++ if (!video->pitch) {
+ return(NULL);
+ }
@@ -170,7 +173,7 @@ diff -r 4646533663ae -r 9b0e5c555c0f src/video/windx5/SDL_dx5video.c
video->w = width;
video->h = height;
video->pitch = SDL_CalculatePitch(video);
-+ if (!current->pitch) {
++ if (!video->pitch) {
+ return(NULL);
+ }
Upstream commit 267d102f6e9c fixes copy+paste mistakes in the CVE-2019-7637 fix, which checked current->pitch instead of video->pitch in the gapi, windib and windx5 backends and broke setting the video mode there. Fold it into the patch so it matches upstream. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- .../libsdl/libsdl-1.2.15/CVE-2019-7637.patch | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)