Sophie

Sophie

distrib > Mageia > 8 > x86_64 > by-pkgid > a48407b9ae23d07a9f26b820f1a114a4 > files > 2

SDL_image-1.2.12-14.mga8.src.rpm

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