git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1422 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2005/03/23 06:57:45... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Tue Mar 22 22:54:46 CET 2005 (tk) |
|
2 |
+--------------------------------- |
|
3 |
+ * libclamav/scanners.c: fix encrypted zip detecion (patch by Dirk Mueller |
|
4 |
+ <mueller*kde.org>) |
|
5 |
+ |
|
1 | 6 |
Tue Mar 22 22:22:30 CET 2005 (tk) |
2 | 7 |
--------------------------------- |
3 | 8 |
* libclamav: add support for old fashioned tar archives |
... | ... |
@@ -373,7 +373,11 @@ static int cli_scanzip(int desc, const char **virname, long int *scanned, const |
373 | 373 |
break; |
374 | 374 |
} |
375 | 375 |
|
376 |
- encrypted = zdirent.d_flags; |
|
376 |
+ /* Bit 0: file is encrypted |
|
377 |
+ * Bit 6: Strong encryption was used |
|
378 |
+ * Bit 13: Encrypted central directory |
|
379 |
+ */ |
|
380 |
+ encrypted = (zdirent.d_flags & 0x2041 != 0); |
|
377 | 381 |
|
378 | 382 |
cli_dbgmsg("Zip: %s, crc32: 0x%x, encrypted: %d, compressed: %u, normal: %u, method: %d, ratio: %d (max: %d)\n", zdirent.d_name, zdirent.d_crc32, encrypted, zdirent.d_csize, zdirent.st_size, zdirent.d_compr, zdirent.d_csize ? (zdirent.st_size / zdirent.d_csize) : 0, limits ? limits->maxratio : 0); |
379 | 383 |
|