Browse code

Fixed bug in find_ep

git-svn: trunk@1996

aCaB authored on 2006/05/28 07:44:55
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Sun May 28 00:42:05 CEST 2006 (acab)
2
+------------------------------------
3
+  * libclamav/upx.c: Fixed upx bug in find_ep reported by Sven
4
+
1 5
 Sat May 27 15:37:51 BST 2006 (njh)
2 6
 ----------------------------------
3 7
   * libclamav:	Some debugging messages didn't print new lines, reported by Sven
... ...
@@ -216,7 +216,7 @@ static int upx_find_ep(char *src, uint32_t ssize, uint32_t upx1, uint32_t ep)
216 216
 
217 217
     /* Verify decompressor length. Avoid crashing on multiple 
218 218
      * compressed files. exe packed by UPX and PEC. */
219
-    if (!CLI_ISCONTAINED(src, ssize, src + ep - upx1, len))
219
+    if (!CLI_ISCONTAINED(src, ssize, src + ep - upx1 + 0xc0, len))
220 220
 	return -1;
221 221
 
222 222
     /* Shift to decompressor start */