fixed bad memory access problem with some jpeg images
authorkramm <kramm>
Thu, 19 Jun 2008 20:31:40 +0000 (20:31 +0000)
committerkramm <kramm>
Thu, 19 Jun 2008 20:31:40 +0000 (20:31 +0000)
src/swfextract.c

index 863faf5..b2e049c 100644 (file)
@@ -618,7 +618,7 @@ int findjpegboundary(U8*data, int len)
 {
     int t;
     int pos=-1;
-    for(t=0;t<len;t++) {
+    for(t=0;t<len-4;t++) {
        if(data[t  ]==0xff &&
           data[t+1]==0xd9 &&
           data[t+2]==0xff &&