Browse code

wwunpack - fixed size of image

git-svn: trunk@2089

aCaB authored on 2006/07/17 10:05:11
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Mon Jul 17 03:00:21 CEST 2006 (acab)
2
+------------------------------------
3
+  * libclamav/wwunpack.c: image size fixup 
4
+
1 5
 Mon Jul 17 01:17:40 CEST 2006 (acab)
2 6
 ------------------------------------
3 7
   * libclamav: wwpack32 handler secured and activated
... ...
@@ -41,7 +41,6 @@
41 41
 **
42 42
 ** review
43 43
 ** check eax vs al
44
-** check the missed samples
45 44
 ** (check for dll's)
46 45
 ** (have a look at older versions)
47 46
 **
... ...
@@ -348,6 +347,10 @@ int wwunpack(char *exe, uint32_t exesz, uint32_t headsize, uint32_t min, uint32_
348 348
   cli_dbgmsg("WWPack: found OEP @%x\n", csize);
349 349
   cli_writeint32(stuff+0x28, csize);
350 350
 
351
+  csize=cli_readint32(stuff+0x50)-VAALIGN(wwpsz);
352
+  cli_writeint32(stuff+0x50, csize);
353
+
354
+
351 355
   stuff+=0xf8;
352 356
   while (sects--) {
353 357
     uint32_t v=cli_readint32(stuff+8);