File: SDL_bmp.c-reject-bmp-files-with-zero-bpp.patch

package info (click to toggle)
libsdl1.2 1.2.15%2Bdfsg2-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,596 kB
  • sloc: ansic: 128,539; cpp: 11,192; sh: 9,887; asm: 2,553; objc: 2,128; makefile: 349; csh: 248; perl: 35; pascal: 8
file content (24 lines) | stat: -rw-r--r-- 736 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Ozkan Sezer <sezeroz@gmail.com>
Date: Tue, 3 Sep 2019 23:00:00 +0300
Subject: SDL_bmp.c: reject bmp files with zero bpp

Fixes:  https://bugzilla.libsdl.org/show_bug.cgi?id=4536
(2.0 commit: https://hg.libsdl.org/SDL/rev/6203d73874ab)

Origin: upstream, commit:https://github.com/libsdl-org/SDL-1.2/commit/9e6e01257ec99a023a5891ef238d30b4d321c06d
---
 src/video/SDL_bmp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c
index 6cadc8a..3a808a3 100644
--- a/src/video/SDL_bmp.c
+++ b/src/video/SDL_bmp.c
@@ -168,6 +168,7 @@ SDL_Surface * SDL_LoadBMP_RW (SDL_RWops *src, int freesrc)
 			ExpandBMP = biBitCount;
 			biBitCount = 8;
 			break;
+		case 0:
 		case 2:
 		case 3:
 		case 5: