fix encrypted zip detecion

git-svn: trunk@1422
remotes/push_mirror/metadata
Tomasz Kojm 20 years ago
parent a7f5fd00f5
commit 5e0d3ebc53
  1. 5
      clamav-devel/ChangeLog
  2. 6
      clamav-devel/libclamav/scanners.c

@ -1,3 +1,8 @@
Tue Mar 22 22:54:46 CET 2005 (tk)
---------------------------------
* libclamav/scanners.c: fix encrypted zip detecion (patch by Dirk Mueller
<mueller*kde.org>)
Tue Mar 22 22:22:30 CET 2005 (tk)
---------------------------------
* 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
break;
}
encrypted = zdirent.d_flags;
/* Bit 0: file is encrypted
* Bit 6: Strong encryption was used
* Bit 13: Encrypted central directory
*/
encrypted = (zdirent.d_flags & 0x2041 != 0);
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);

Loading…
Cancel
Save