git-svn: trunk@3648
aCaB authored on 2008/02/18 08:22:00... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Mon Feb 18 00:09:32 CET 2008 (acab) |
|
2 |
+----------------------------------- |
|
3 |
+ * libclamav/unzip: skip zip sanity checks for SFX - bb#845 |
|
4 |
+ |
|
1 | 5 |
Sun Feb 17 10:53:57 CET 2008 (tk) |
2 | 6 |
--------------------------------- |
3 | 7 |
* libclamav/ole2_extract.c: handle null ctx, required for sigtool (bb#846) |
... | ... |
@@ -386,19 +386,19 @@ static unsigned int lhdr(uint8_t *zip, uint32_t zsize, unsigned int *fu, unsigne |
386 | 386 |
zsize-=csize; |
387 | 387 |
} |
388 | 388 |
|
389 |
- if(!LH_flen) { |
|
389 |
+ if(ch && !LH_flen) { |
|
390 | 390 |
cli_dbgmsg("cli_unzip: found noname file\n"); |
391 | 391 |
*ctx->virname = "Suspect.Zip"; |
392 | 392 |
*ret = CL_VIRUS; |
393 | 393 |
return 0; |
394 | 394 |
} |
395 |
- if(!LH_usize && LH_crc32) { |
|
395 |
+ if(ch && !LH_usize && LH_crc32) { |
|
396 | 396 |
cli_dbgmsg("Zip: Broken file or modified information in local header part of archive\n"); |
397 | 397 |
*ctx->virname = "Exploit.Zip.ModifiedHeaders"; |
398 | 398 |
* ret = CL_VIRUS; |
399 | 399 |
return 0; |
400 | 400 |
} |
401 |
- if(!LH_csize && LH_usize) { |
|
401 |
+ if(ch && !LH_csize && LH_usize) { |
|
402 | 402 |
cli_dbgmsg("Zip: Malformed file (csize == 0 but usize != 0)\n"); |
403 | 403 |
*ctx->virname = "Suspect.Zip"; |
404 | 404 |
*ret = CL_VIRUS; |