git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@618 77e5149b-7576-45b1-b177-96237e5ba77b
Trog authored on 2004/06/22 00:22:58... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Mon Jun 21 16:23:07 BST 2004 (trog) |
|
2 |
+----------------------------------- |
|
3 |
+ * libclamac/ole2_extract.c: Don't try and process (probably corrupt) files |
|
4 |
+ with untested parameters, issue a warning instead. |
|
5 |
+ |
|
1 | 6 |
Mon Jun 21 11:21:48 BST 2004 (njh) |
2 | 7 |
---------------------------------- |
3 | 8 |
* libclamav/mbox.c: Fix crash when a multipart/mixed message |
... | ... |
@@ -754,13 +754,16 @@ int cli_ole2_extract(int fd, const char *dirname) |
754 | 754 |
} |
755 | 755 |
|
756 | 756 |
if (hdr.log2_big_block_size != 9) { |
757 |
- cli_dbgmsg("WARNING: untested big block size - please report\n\n"); |
|
757 |
+ cli_errmsg("WARNING: not scanned; untested big block size - please report\n"); |
|
758 |
+ goto abort; |
|
758 | 759 |
} |
759 | 760 |
if (hdr.log2_small_block_size != 6) { |
760 |
- cli_dbgmsg("WARNING: untested small block size - please report\n\n"); |
|
761 |
+ cli_errmsg("WARNING: not scanned; untested small block size - please report\n"); |
|
762 |
+ goto abort; |
|
761 | 763 |
} |
762 | 764 |
if (hdr.sbat_cutoff != 4096) { |
763 |
- cli_dbgmsg("WARNING: untested sbat cutoff - please report\n\n"); |
|
765 |
+ cli_errmsg("WARNING: not scanned; untested sbat cutoff - please report\n"); |
|
766 |
+ goto abort; |
|
764 | 767 |
} |
765 | 768 |
|
766 | 769 |
print_ole2_header(&hdr); |
... | ... |
@@ -773,6 +776,7 @@ int cli_ole2_extract(int fd, const char *dirname) |
773 | 773 |
|
774 | 774 |
ole2_walk_property_tree(fd, &hdr, dirname, 0, handler_writefile, 0, 0); |
775 | 775 |
|
776 |
+abort: |
|
776 | 777 |
#ifdef HAVE_MMAP |
777 | 778 |
if (hdr.m_area != NULL) { |
778 | 779 |
munmap(hdr.m_area, hdr.m_length); |