mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
cli_parseres_special: check size before attempting to allocate. (bb #1506)
git-svn: trunk@4999
This commit is contained in:
parent
0680321846
commit
646c2a4857
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Apr 1 19:39:12 EEST 2009 (edwin)
|
||||
-------------------------------------
|
||||
* libclamav/pe.c: cli_parseres_special: check size before attempting
|
||||
to allocate. (bb #1506)
|
||||
|
||||
Wed Apr 1 14:00:35 CEST 2009 (tk)
|
||||
----------------------------------
|
||||
* clamd/session.c: respect TemporaryDirectory in cli_gentempfd()
|
||||
|
|
|
@ -392,7 +392,7 @@ static void cli_parseres_special(uint32_t base, uint32_t rva, int srcfd, struct
|
|||
uint32_t isz = cli_readint32(resdir+4);
|
||||
char *str;
|
||||
rawaddr = cli_rawaddr(cli_readint32(resdir), exe_sections, nsections, &err, fsize, hdr_size);
|
||||
if (err || !isz || rawaddr+isz >= fsize) {
|
||||
if (err || !isz || isz >= fsize || rawaddr+isz >= fsize) {
|
||||
cli_dbgmsg("cli_parseres_special: invalid resource table entry: %lu + %lu\n",
|
||||
(unsigned long)rawaddr,
|
||||
(unsigned long)isz);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue