[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Tomasz Kojm tkojm at clamav.net
Sun Apr 4 00:59:24 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 8201d79da4729e275aa6a5246332d24a91dce347
Author: Tomasz Kojm <tkojm at clamav.net>
Date:   Mon Aug 3 14:50:13 2009 +0200

    libclamav/unzip.c: fix detection of encrypted zip files embedded into other files (bb#1660)

diff --git a/ChangeLog b/ChangeLog
index cb685af..396cfd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Aug  3 14:48:27 CEST 2009 (tk)
+----------------------------------
+ * libclamav/unzip.c: fix detection of encrypted zip files embedded into
+		      other files (bb#1660)
+
 Sun Aug  2 14:46:40 EEST 2009 (edwin)
 -------------------------------------
  * libclamav/bytecode_vm.c: fix SIGBUS on sparc.
diff --git a/libclamav/unzip.c b/libclamav/unzip.c
index aec537c..8dd0bc0 100644
--- a/libclamav/unzip.c
+++ b/libclamav/unzip.c
@@ -379,6 +379,13 @@ static unsigned int lhdr(uint8_t *zip, uint32_t zsize, unsigned int *fu, unsigne
     return 0;
   }
 
+  if((LH_flags & F_ENCR) && DETECT_ENCRYPTED) {
+    cli_dbgmsg("cli_unzip: Encrypted files found in archive.\n");
+    *ctx->virname = "Encrypted.Zip";
+    *ret = CL_VIRUS;
+    return 0;
+  }
+ 
   if(LH_flags & F_USEDD) {
     cli_dbgmsg("cli_unzip: lh - has data desc\n");
     if(!ch) return 0;
@@ -400,12 +407,6 @@ static unsigned int lhdr(uint8_t *zip, uint32_t zsize, unsigned int *fu, unsigne
       return 0;
     } 
     if(LH_flags & F_ENCR) {
-      if(DETECT_ENCRYPTED) {
-	cli_dbgmsg("cli_unzip: Encrypted files found in archive.\n");
-	*ctx->virname = "Encrypted.Zip";
-	*ret = CL_VIRUS;
-	return 0;
-      }
       cli_dbgmsg("cli_unzip: lh - skipping encrypted file\n");
     } else *ret = unz(zip, csize, usize, LH_method, LH_flags, fu, ctx, tmpd);
     zip+=csize;

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list