mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-11-10 13:01:03 +00:00
VBA alignment check. Should now work with
all MacOffice documents. git-svn: trunk@406
This commit is contained in:
parent
31c42eb7ea
commit
cee86c13d7
2 changed files with 15 additions and 5 deletions
|
|
@ -1,3 +1,8 @@
|
|||
Wed Mar 17 11:53:05 GMT 2004 (trog)
|
||||
-----------------------------------
|
||||
* libclamav/vba_extract.c: VBA alignment check. Should now work with
|
||||
all MacOffice documents.
|
||||
|
||||
Wed Mar 17 09:32:45 GMT 2004 (trog)
|
||||
-----------------------------------
|
||||
* libclamav/vba_extract.c: Add support for MacOffice98 documents
|
||||
|
|
|
|||
|
|
@ -297,11 +297,6 @@ vba_project_t *vba56_dir_read(const char *dir)
|
|||
cli_dbgmsg("VBA Project: %s, VBA Version=%d\n", vba_version[i].name,
|
||||
vba_version[i].vba_version);
|
||||
|
||||
if (i == 9) {
|
||||
cli_dbgmsg("MacOffice2001 not currently supported\n");
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
is_mac = vba_version[i].is_mac;
|
||||
|
||||
/*****************************************/
|
||||
|
|
@ -498,6 +493,16 @@ vba_project_t *vba56_dir_read(const char *dir)
|
|||
}
|
||||
} while(ooff != 0xFFFF);
|
||||
|
||||
/* check for alignment error */
|
||||
lseek(fd, -3, SEEK_CUR);
|
||||
if (vba_readn(fd, &ooff, 2) != 2) {
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
if (ooff != 0xFFFF) {
|
||||
lseek(fd, 1, SEEK_CUR);
|
||||
}
|
||||
|
||||
if (vba_readn(fd, &ooff, 2) != 2) {
|
||||
close(fd);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue