Merge branch 'Mattiwatti-offset-to-rva-fix' into devel

https://github.com/upx/upx/pull/193
This commit is contained in:
John Reiser
2018-04-02 09:08:57 -07:00
+2 -2
View File
@@ -1111,9 +1111,9 @@ void PeFile::Export::convert(unsigned eoffs,unsigned esize)
size = sizeof(export_dir_t);
iv.add(eoffs,size);
if (getsize() <= (unsigned)edir.name) {
if (eoffs + esize <= (unsigned)edir.name) {
char msg[50]; snprintf(msg, sizeof(msg),
"bad export directory name offset %#x", (unsigned)edir.name);
"bad export directory name RVA %#x", (unsigned)edir.name);
throwInternalError(msg);
}
unsigned len = strlen(base + edir.name) + 1;