Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > af5a288059efe08159690dfd0024a0c1 > files > 7

SDL_image-1.2.12-9.2.mga6.src.rpm

Description: gif: report error on bogus LWZ data, instead of overflowing a buffer.
Origin: upstream, https://hg.libsdl.org/SDL_image/rev/45e750f92c84

--- a/IMG_gif.c
+++ b/IMG_gif.c
@@ -494,8 +494,10 @@ LWZReadByte(SDL_RWops *src, int flag, int input_code_size)
 	}
 	while (code >= clear_code) {
 	    *sp++ = table[1][code];
-	    if (code == table[0][code])
-		RWSetMsg("circular table entry BIG ERROR");
+	    if (code == table[0][code]) {
+	        RWSetMsg("circular table entry BIG ERROR");
+	        return -3;
+	    }
 	    code = table[0][code];
 	}