Browse code

wrong write size calculation in fsg133

git-svn: trunk@1865

aCaB authored on 2006/03/21 05:56:10
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Mon Mar 20 21:56:38 CET 2006 (acab)
2
+-----------------------------------
3
+  * libclamav/fsg.c: fix wrong write size calculation (reported by Andrey J.
4
+  				Melnikoff (TEMHOTA) <temnota*kmv.ru>)
5
+
1 6
 Sun Mar 19 21:49:19 CET 2006 (tk)
2 7
 ---------------------------------
3 8
   * freshclam: fix support for LocalIPAddress (patch by Anton Yuzhaninov
... ...
@@ -265,7 +265,7 @@ int unfsg_133(char *source, char *dest, int ssize, int dsize, struct SECTION *se
265 265
   }
266 266
 
267 267
   if ( (tsrc = rebuildpe(dest, sections, sectcount+1, base, ep, 0, 0)) ) {
268
-    if (cli_writen(file, tsrc, 0x148+0x80+0x28+dsize)==-1) {
268
+    if (cli_writen(file, tsrc, 0x148+0x80+0x28*(sectcount+1)+offs)==-1) {
269 269
       free(tsrc);
270 270
       return 0;
271 271
     }