Package: sdl-image1.2 / 1.2.12-12

CVE-2017-12122-2.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: lbm: Fail to load images with unsupported/bogus color depth.
Origin: upstream, https://hg.libsdl.org/SDL_image/rev/97f7f01e0665

--- a/IMG_lbm.c
+++ b/IMG_lbm.c
@@ -237,6 +237,12 @@ SDL_Surface *IMG_LoadLBM_RW( SDL_RWops *src )
 		nbplanes = 1;
 	}
 
+	if ((nbplanes != 1) && (nbplanes != 4) && (nbplanes != 8) && (nbplanes != 24))
+	{
+		error="unsupported number of color planes";
+		goto done;
+	}
+
 	stencil = (bmhd.mask & 1);   /* There is a mask ( 'stencil' ) */
 
 	/* Allocate memory for a temporary buffer ( used for