shithub: dumb

Download patch

ref: bd07b0404fff4df50ac6ecf852ab56b70c2eaad0
parent: 0948d27028784538d6c5da6937e40f11fa7bacd2
author: Christopher Snowhill <kode54@gmail.com>
date: Tue Sep 12 12:30:15 EDT 2017

Check pattern size against available data.

--- a/src/it/readoldpsm.c
+++ b/src/it/readoldpsm.c
@@ -224,6 +224,8 @@
 		}
 
 		psize = (psize + 15) & ~15;
+		
+		if (offset + psize > size) goto error_fb;
 
 		end = ptr + psize;
 		ptr += 4;