diff options
Diffstat (limited to 'runtime/src/pe_loader.cpp')
| -rw-r--r-- | runtime/src/pe_loader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/src/pe_loader.cpp b/runtime/src/pe_loader.cpp index a59f9d0b1..c10c6ea5a 100644 --- a/runtime/src/pe_loader.cpp +++ b/runtime/src/pe_loader.cpp | |||
| @@ -1051,8 +1051,8 @@ void Loader::bind_imports(Module& m) { | |||
| 1051 | uint16_t ord = by_ord ? (uint16_t)IMAGE_ORDINAL64(lookup->u1.Ordinal) : 0; | 1051 | uint16_t ord = by_ord ? (uint16_t)IMAGE_ORDINAL64(lookup->u1.Ordinal) : 0; |
| 1052 | std::string name; | 1052 | std::string name; |
| 1053 | if (!by_ord) { | 1053 | if (!by_ord) { |
| 1054 | require_range(m.name, lookup->u1.AddressOfData, sizeof(uint16_t), m.size, "an import name"); | ||
| 1054 | uint32_t hint = static_cast<uint32_t>(lookup->u1.AddressOfData); | 1055 | uint32_t hint = static_cast<uint32_t>(lookup->u1.AddressOfData); |
| 1055 | require_range(m.name, hint, sizeof(uint16_t), m.size, "an import name"); | ||
| 1056 | name = read_string(m.name, m.base, m.size, hint + sizeof(uint16_t), "an import name"); | 1056 | name = read_string(m.name, m.base, m.size, hint + sizeof(uint16_t), "an import name"); |
| 1057 | } | 1057 | } |
| 1058 | at<IMAGE_THUNK_DATA64>(m.base, static_cast<uint32_t>(iat_rva))->u1.Function = | 1058 | at<IMAGE_THUNK_DATA64>(m.base, static_cast<uint32_t>(iat_rva))->u1.Function = |