Blob Blame Raw
diff -pruN clamav-0.92.1.orig/libclamav/spin.c clamav-0.92.1/libclamav/spin.c
--- clamav-0.92.1.orig/libclamav/spin.c	2007-12-06 13:59:04.000000000 +0100
+++ clamav-0.92.1/libclamav/spin.c	2008-04-24 19:16:26.000000000 +0200
@@ -419,7 +419,7 @@ int unspin(char *src, int ssize, struct 
     /*    len = cli_readint32(ep+0x2fc8); -- Using vsizes instead */
 
     for (j=0; j<sectcnt; j++) {
-      if (sections[j].rva <= key32 && sections[j].rva+sections[j].rsz > key32)
+      if (sections[j].rva <= key32 && key32-sections[j].rva < sections[j].vsz && CLI_ISCONTAINED(src + sections[j].raw, sections[j].rsz, src + sections[j].raw, key32 - sections[j].rva))
 	break;
     }