diff --git a/ChangeLog b/ChangeLog index ad3bd857c..fa69a2145 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Feb 18 00:09:32 CET 2008 (acab) +----------------------------------- + * libclamav/unzip: skip zip sanity checks for SFX - bb#845 + Sun Feb 17 10:53:57 CET 2008 (tk) --------------------------------- * libclamav/ole2_extract.c: handle null ctx, required for sigtool (bb#846) diff --git a/libclamav/unzip.c b/libclamav/unzip.c index 692f1fb5c..3e2de4bcf 100644 --- a/libclamav/unzip.c +++ b/libclamav/unzip.c @@ -386,19 +386,19 @@ static unsigned int lhdr(uint8_t *zip, uint32_t zsize, unsigned int *fu, unsigne zsize-=csize; } - if(!LH_flen) { + if(ch && !LH_flen) { cli_dbgmsg("cli_unzip: found noname file\n"); *ctx->virname = "Suspect.Zip"; *ret = CL_VIRUS; return 0; } - if(!LH_usize && LH_crc32) { + if(ch && !LH_usize && LH_crc32) { cli_dbgmsg("Zip: Broken file or modified information in local header part of archive\n"); *ctx->virname = "Exploit.Zip.ModifiedHeaders"; * ret = CL_VIRUS; return 0; } - if(!LH_csize && LH_usize) { + if(ch && !LH_csize && LH_usize) { cli_dbgmsg("Zip: Malformed file (csize == 0 but usize != 0)\n"); *ctx->virname = "Suspect.Zip"; *ret = CL_VIRUS;