1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Check getImageSize(). CERT-FI 829767

id:000058,sig:06,src:000001,op:havoc,rep:64
This commit is contained in:
John Reiser 2015-05-09 07:29:26 -07:00
parent c777da263e
commit 71a9941b84

View File

@ -778,6 +778,8 @@ int PackWcle::canUnpack()
// FIXME: 1024 could be too large for some files
//int len = 1024;
int len = UPX_MIN(getImageSize(), 256u);
if (len == 0)
return false;
return readPackHeader(len) ? 1 : -1;
}