diff --git a/ChangeLog b/ChangeLog index f96ffee9d..0c94b2694 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed May 30 15:07:58 CEST 2007 (tk) +---------------------------------- + * libclamav/scanners.c: fix warning on AES encrypted zip archives (bb#430) + Wed May 30 13:27:09 CEST 2007 (tk) ---------------------------------- * fresclam/manager.c: add sanity check for %v (bb#463) diff --git a/libclamav/scanners.c b/libclamav/scanners.c index 95c03b987..e4ed03bbf 100644 --- a/libclamav/scanners.c +++ b/libclamav/scanners.c @@ -441,17 +441,19 @@ static int cli_scanzip(int desc, cli_ctx *ctx, off_t sfx_offset, uint32_t *sfx_c break; } - if(DETECT_ENCRYPTED && encrypted) { - cli_dbgmsg("Zip: Encrypted files found in archive.\n"); - lseek(desc, 0, SEEK_SET); - ret = cli_scandesc(desc, ctx, 0, 0, 0, NULL); - if(ret < 0) { + if(encrypted) { + if(DETECT_ENCRYPTED) { + cli_dbgmsg("Zip: Encrypted files found in archive.\n"); + lseek(desc, 0, SEEK_SET); + ret = cli_scandesc(desc, ctx, 0, 0, 0, NULL); + if(ret < 0) { + break; + } else if(ret != CL_VIRUS) { + *ctx->virname = "Encrypted.Zip"; + ret = CL_VIRUS; + } break; - } else if(ret != CL_VIRUS) { - *ctx->virname = "Encrypted.Zip"; - ret = CL_VIRUS; - } - break; + } else continue; } if(ctx->limits) {