mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
bb#3062
This commit is contained in:
parent
872d0a90d6
commit
00f5854d79
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Nov 4 00:52:21 CET 2011 (acab)
|
||||
-----------------------------------
|
||||
* libclamav/pe.c: parse vinfo where varfileinfo occours before stringfileinfo
|
||||
(bb#3062)
|
||||
|
||||
Mon Oct 10 14:41:48 CEST 2011 (tk)
|
||||
----------------------------------
|
||||
* freshclam/manager.c: fix error when compiling without DNS support (bb#3056)
|
||||
|
|
|
@ -2506,7 +2506,7 @@ int cli_peheader(fmap_t *map, struct cli_exe_info *peinfo)
|
|||
continue;
|
||||
|
||||
while(res_sz>4) { /* look for version_info - NOT RESUMABLE (expecting exactly one versioninfo) */
|
||||
uint32_t vinfo_sz, vinfo_val_sz;
|
||||
uint32_t vinfo_sz, vinfo_val_sz, got_varfileinfo = 0;
|
||||
|
||||
vinfo_sz = vinfo_val_sz = cli_readint32(vptr);
|
||||
vinfo_sz &= 0xffff;
|
||||
|
@ -2535,7 +2535,14 @@ int cli_peheader(fmap_t *map, struct cli_exe_info *peinfo)
|
|||
if(sfi_sz > vinfo_sz)
|
||||
break; /* the content is larger than the container */
|
||||
|
||||
/* expecting stringfileinfo to always precede varfileinfo */
|
||||
if(!got_varfileinfo && sfi_sz > 6 + 0x18 && !memcmp(vptr+6, "V\0a\0r\0F\0i\0l\0e\0I\0n\0f\0o\0\0\0", 0x18)) {
|
||||
/* skip varfileinfo as it sometimes appear before stringtableinfo */
|
||||
vptr += sfi_sz;
|
||||
vinfo_sz -= sfi_sz;
|
||||
got_varfileinfo = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if(sfi_sz <= 6 + 0x1e || memcmp(vptr+6, "S\0t\0r\0i\0n\0g\0F\0i\0l\0e\0I\0n\0f\0o\0\0\0", 0x1e)) {
|
||||
/* - there should be enough room for the header(6) and the key "StringFileInfo"(1e)
|
||||
* - the key should match */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue