Browse code

libclamav/mspack.c: improve unpacking of malformed cabinets (bb#1826)

Tomasz Kojm authored on 2010/04/01 01:15:44
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Mar 31 18:13:38 CEST 2010 (tk)
2
+----------------------------------
3
+ * libclamav/mspack.c: improve unpacking of malformed cabinets (bb#1826)
4
+
1 5
 Wed Mar 31 18:07:05 CEST 2010 (acab)
2 6
 ------------------------------------
3 7
   * libclamav/7z: add recovery mode to 7z ansi
... ...
@@ -697,10 +697,9 @@ int mszip_decompress(struct mszip_stream *zip, off_t out_bytes) {
697 697
     out_bytes   -= i;
698 698
   }
699 699
 
700
-  if (out_bytes) {
700
+  if (out_bytes)
701 701
     cli_dbgmsg("mszip_decompress: bytes left to output\n");
702
-    return zip->error = CL_EFORMAT;
703
-  }
702
+
704 703
   return CL_SUCCESS;
705 704
 }
706 705
 
... ...
@@ -1508,10 +1507,8 @@ int lzx_decompress(struct lzx_stream *lzx, off_t out_bytes) {
1508 1508
 
1509 1509
   } /* while (lzx->frame < end_frame) */
1510 1510
 
1511
-  if (out_bytes) {
1511
+  if (out_bytes)
1512 1512
     cli_dbgmsg("lzx_decompress: bytes left to output\n");
1513
-    return lzx->error = CL_EFORMAT;
1514
-  }
1515 1513
 
1516 1514
   /* store local state */
1517 1515
   LZX_STORE_BITS;