mirror of
https://github.com/upx/upx
synced 2025-10-05 19:20:23 +08:00
Avoid trouble: disallow empty name of export directory
https://github.com/upx/upx/issues/425 modified: pefile.cpp
This commit is contained in:
parent
bfd2153f2b
commit
dadbbbdc64
|
@ -1143,7 +1143,7 @@ void PeFile::Export::convert(unsigned eoffs,unsigned esize)
|
|||
size = sizeof(export_dir_t);
|
||||
iv.add(eoffs,size);
|
||||
|
||||
if (eoffs + esize <= (unsigned)edir.name) {
|
||||
if (!edir.name || eoffs + esize <= (unsigned)edir.name) {
|
||||
char msg[50]; snprintf(msg, sizeof(msg),
|
||||
"bad export directory name RVA %#x", (unsigned)edir.name);
|
||||
throwInternalError(msg);
|
||||
|
|
Loading…
Reference in New Issue
Block a user