aboutsummaryrefslogtreecommitdiffstats
path: root/main/sdl/0002-CVE-2019-7637.patch
blob: bf28310d5eb2a7ae52f8efe02d2fc137b70903fb (plain) (blame)
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
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.

diff -r 37d0eba8fa17 -r 32075e9e2135 src/video/gapi/SDL_gapivideo.c
--- a/src/video/gapi/SDL_gapivideo.c	Wed Jul 31 23:50:10 2019 +0300
+++ b/src/video/gapi/SDL_gapivideo.c	Fri Aug 02 00:35:05 2019 +0300
@@ -733,7 +733,7 @@
 	video->w = gapi->w = width;
 	video->h = gapi->h = height;
 	video->pitch = SDL_CalculatePitch(video); 
-	if (!current->pitch) {
+	if (!video->pitch) {
 		return(NULL);
 	}
 
diff -r 37d0eba8fa17 -r 32075e9e2135 src/video/windib/SDL_dibvideo.c
--- a/src/video/windib/SDL_dibvideo.c	Wed Jul 31 23:50:10 2019 +0300
+++ b/src/video/windib/SDL_dibvideo.c	Fri Aug 02 00:35:05 2019 +0300
@@ -675,7 +675,7 @@
 	video->w = width;
 	video->h = height;
 	video->pitch = SDL_CalculatePitch(video);
-	if (!current->pitch) {
+	if (!video->pitch) {
 		return(NULL);
 	}
 
diff -r 37d0eba8fa17 -r 32075e9e2135 src/video/windx5/SDL_dx5video.c
--- a/src/video/windx5/SDL_dx5video.c	Wed Jul 31 23:50:10 2019 +0300
+++ b/src/video/windx5/SDL_dx5video.c	Fri Aug 02 00:35:05 2019 +0300
@@ -1127,7 +1127,7 @@
 		video->w = width;
 		video->h = height;
 		video->pitch = SDL_CalculatePitch(video);
-		if (!current->pitch) {
+		if (!video->pitch) {
 			return(NULL);
 		}