summaryrefslogtreecommitdiff
path: root/source/a/ncompress/ncompress-4.2.4-bssUnderflow.patch
blob: 0ae7ec59f081d9b61c6f818b37fbd5467b35788c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- 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;
 				}