File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,18 @@ static void ReadExportDirectory(MODINFO & Info, ULONG_PTR FileMapVA)
169
169
170
170
auto nameOffset = rva2offset (addressOfNames[i]);
171
171
if (nameOffset) // Silent ignore (3) by ntdll loader: invalid names or addresses of names
172
- Info.exports [index].name = String ((const char *)(nameOffset + FileMapVA));
172
+ {
173
+ // Info.exports has excluded some invalid exports, so addressOfNameOrdinals[i] is not equal to
174
+ // the index of Info.exports. We need to iterate over Info.exports.
175
+ for (size_t j = 0 ; j < Info.exports .size (); j++)
176
+ {
177
+ if (index + exportDir->Base == Info.exports [j].ordinal )
178
+ {
179
+ Info.exports [j].name = String ((const char *)(nameOffset + FileMapVA));
180
+ break ;
181
+ }
182
+ }
183
+ }
173
184
}
174
185
}
175
186
You can’t perform that action at this time.
0 commit comments