Better support for non-standard OLE2 archives

git-svn: trunk@524
remotes/push_mirror/metadata
Trog 22 years ago
parent e84cbd9834
commit cd9833ef0a
  1. 4
      clamav-devel/ChangeLog
  2. 8
      clamav-devel/libclamav/ole2_extract.c

@ -1,3 +1,7 @@
Mon Apr 26 11:51:28 BST 2004 (trog)
-----------------------------------
libclamav/ole2_extract.c: Better support for non-standard OLE2 archives
Sun Apr 25 13:58:35 BST 2004 (njh)
----------------------------------
* clamav-milter: Added --pidfile

@ -480,7 +480,8 @@ static void ole2_walk_property_tree(int fd, ole2_header_t *hdr, const char *dir,
print_ole2_property(&prop_block[index]);
switch (prop_block[index].type) {
case 5: /* Root Entry */
if (prop_index != 0) {
if ((prop_index != 0) || (rec_level !=0) ||
(file_count != 0)) {
/* Can only have RootEntry as the top */
cli_dbgmsg("ERROR: illegal Root Entry\n");
return;
@ -511,7 +512,10 @@ static void ole2_walk_property_tree(int fd, ole2_header_t *hdr, const char *dir,
return;
}
snprintf(dirname, strlen(dir)+8, "%s/%.6d", dir, prop_index);
mkdir(dirname, 0700);
if (mkdir(dirname, 0700) != 0) {
free(dirname);
return;
}
cli_dbgmsg("OLE2 dir entry: %s\n",dirname);
ole2_walk_property_tree(fd, hdr, dir,
prop_block[index].prev, handler, rec_level+1, file_count);

Loading…
Cancel
Save