1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
From: Ozkan Sezer <sezeroz@gmail.com>
Date: Fri, 2 Aug 2019 00:35:05 +0300
Subject: fix copy+paste mistakes in commit 9b0e5c555c0f (CVE-2019-7637 fix)
http://hg.libsdl.org/SDL/rev/9b0e5c555c0f made copy+paste mistakes which
resulted in windows versions failing to set video mode.
Origin: upstream, commit:https://github.com/libsdl-org/SDL-1.2/commit/267d102f6e9ce32878a6251d5136b176fdd2d49e
---
src/video/gapi/SDL_gapivideo.c | 2 +-
src/video/windib/SDL_dibvideo.c | 2 +-
src/video/windx5/SDL_dx5video.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/video/gapi/SDL_gapivideo.c b/src/video/gapi/SDL_gapivideo.c
index 8a06485..220260a 100644
--- a/src/video/gapi/SDL_gapivideo.c
+++ b/src/video/gapi/SDL_gapivideo.c
@@ -733,7 +733,7 @@ SDL_Surface *GAPI_SetVideoMode(_THIS, SDL_Surface *current,
video->w = gapi->w = width;
video->h = gapi->h = height;
video->pitch = SDL_CalculatePitch(video);
- if (!current->pitch) {
+ if (!video->pitch) {
return(NULL);
}
diff --git a/src/video/windib/SDL_dibvideo.c b/src/video/windib/SDL_dibvideo.c
index 86ebb12..64e3897 100644
--- a/src/video/windib/SDL_dibvideo.c
+++ b/src/video/windib/SDL_dibvideo.c
@@ -675,7 +675,7 @@ SDL_Surface *DIB_SetVideoMode(_THIS, SDL_Surface *current,
video->w = width;
video->h = height;
video->pitch = SDL_CalculatePitch(video);
- if (!current->pitch) {
+ if (!video->pitch) {
return(NULL);
}
diff --git a/src/video/windx5/SDL_dx5video.c b/src/video/windx5/SDL_dx5video.c
index 39fc4fc..ec387fb 100644
--- a/src/video/windx5/SDL_dx5video.c
+++ b/src/video/windx5/SDL_dx5video.c
@@ -1127,7 +1127,7 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current,
video->w = width;
video->h = height;
video->pitch = SDL_CalculatePitch(video);
- if (!current->pitch) {
+ if (!video->pitch) {
return(NULL);
}
|