Skip to content

Commit ba7787d

Browse files
author
Zezula Ladislav
committed
Fixed loading delayed imports by ordinal
1 parent 8669c5a commit ba7787d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

deps/pelib/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ if(CMAKE_CXX_COMPILER)
88
endif()
99

1010
ExternalProject_Add(pelib-project
11-
URL https://github.com/avast-tl/pelib/archive/574de5912f7e07e981ef079639fb003aaa7490b5.zip
12-
# URL https://github.com/avast-tl/pelib/archive/19f9a34c0dd10657303e15f7a9d03de9d177e6be.zip
11+
URL https://github.com/avast-tl/pelib/archive/master.zip
1312
DOWNLOAD_NAME pelib.zip
1413
CMAKE_ARGS
1514
# This does not work on MSVC, but may be useful on Linux.

include/retdec/fileformat/file_format/pe/pe_template.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ template<int bits> bool peDelayImport(const PeLib::PeHeaderT<bits> &peHeader,
579579
import.setAddress(peImageBase(peHeader) + function->address.Value);
580580
import.setLibraryIndex(fileIndex);
581581
import.invalidateOrdinalNumber();
582-
if(library->ordinalNumbersAreValid())
582+
if(library->ordinalNumbersAreValid() && function->hint != 0)
583583
{
584584
import.setOrdinalNumber(function->hint);
585585
}

0 commit comments

Comments
 (0)