sf.net bug #1620733: As a very first step, added two calls to
ICHECK(dname,1). Of course we still need a proper fix for this.
This commit is contained in:
@@ -1185,6 +1185,7 @@ void PackW32Pe::rebuildImports(upx_byte *& extrainfo)
|
|||||||
for (p = idata; get_le32(p) != 0; ++p)
|
for (p = idata; get_le32(p) != 0; ++p)
|
||||||
{
|
{
|
||||||
const upx_byte *dname = get_le32(p) + import;
|
const upx_byte *dname = get_le32(p) + import;
|
||||||
|
ICHECK(dname, 1);
|
||||||
const unsigned dlen = strlen(dname);
|
const unsigned dlen = strlen(dname);
|
||||||
ICHECK(dname, dlen + 1);
|
ICHECK(dname, dlen + 1);
|
||||||
|
|
||||||
@@ -1210,6 +1211,7 @@ void PackW32Pe::rebuildImports(upx_byte *& extrainfo)
|
|||||||
{
|
{
|
||||||
// restore the name of the dll
|
// restore the name of the dll
|
||||||
const upx_byte *dname = get_le32(p) + import;
|
const upx_byte *dname = get_le32(p) + import;
|
||||||
|
ICHECK(dname, 1);
|
||||||
const unsigned dlen = strlen(dname);
|
const unsigned dlen = strlen(dname);
|
||||||
ICHECK(dname, dlen + 1);
|
ICHECK(dname, dlen + 1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user