Browse code

unzip leaks - found that b***

git-svn: trunk@3436

aCaB authored on 2007/12/19 04:34:48
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Dec 18 19:55:13 CET 2007 (acab)
2
+-----------------------------------
3
+  * libclamav/unzip.c: Fix mmap leaks in unzip 
4
+
1 5
 Tue Dec 18 19:43:04 CET 2007 (tk)
2 6
 ---------------------------------
3 7
   * libclamav: add (initial) support for direct loading of CVD files (without
... ...
@@ -562,7 +562,7 @@ int cli_unzip_single(int f, cli_ctx *ctx, off_t lhoffl) {
562 562
 
563 563
   lhdr(&map[lhoffl], fsize, &fu, 0, NULL, &ret, ctx, NULL);
564 564
 
565
-  munmap(map, fsize);
565
+  munmap(map, st.st_size);
566 566
   return ret;
567 567
 }
568 568