Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > ad880b29faf0277bdecff9739da5fab4 > files > 2

ncompress-4.2.4-56.fc15.src.rpm

--- ncompress-4.2.4/compress42.c.bssUnderflow	2006-08-10 11:40:03.000000000 +0200
+++ ncompress-4.2.4/compress42.c	2006-08-10 11:40:31.000000000 +0200
@@ -1689,6 +1689,10 @@
 
 				if (oldcode == -1)
 				{
+		                        if (code >= 256) {
+                	                        fprintf(stderr, "uncompress: corrupt input\n");
+                        	                abort_compress();
+                                	}
 					outbuf[outpos++] = (char_type)(finchar = (int)(oldcode = code));
 					continue;
 				}