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:
parent
c777da263e
commit
71a9941b84
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user