fix possible buffer overflow

git-svn: trunk@1722
remotes/push_mirror/metadata
Tomasz Kojm 20 years ago
parent e362d35e3b
commit 337b3f5102
  1. 4
      clamav-devel/ChangeLog
  2. 2
      clamav-devel/libclamav/upx.c

@ -1,3 +1,7 @@
Fri Sep 16 16:49:14 CEST 2005 (tk)
----------------------------------
* libclamav/upx.c: fix possible buffer overflow (acab)
Fri Sep 16 16:39:37 CEST 2005 (tk)
----------------------------------
* libclamav/fsg.c: fix possible infinite loop (acab)

@ -117,7 +117,7 @@ int pefromupx (char *src, char *dst, int *dsize, uint32_t ep, uint32_t upx0, uin
}
sections = pehdr+0xf8;
if ( ! (sectcnt = pehdr[6]+256*pehdr[7])) {
if ( ! (sectcnt = (unsigned char)pehdr[6]+256*(unsigned char)pehdr[7])) {
cli_dbgmsg("UPX: No sections? - giving up rebuild\n");
return 0;
}

Loading…
Cancel
Save