Skip to content

Commit

Permalink
fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
apolukhin committed Dec 19, 2024
1 parent cabdb93 commit 41869d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/boost/dll/detail/pe_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class pe_info {

std::cerr << "!!!!!! BEFORE exports(fs, h)\n";
const exports_t exprt = exports(fs, h);
std::cerr << "!!!!!! AFTER exports(fs, h) exprt.NumberOfFunctions " << exprt.NumberOfFunctions << "\n";
std::cerr << "!!!!!! AFTER exports(fs, h) exprt.NumberOfFunctions " << exprt.NumberOfFunctions << " NumberOfNames = " << exprt.NumberOfNames << "\n";
const std::size_t exported_symbols = exprt.NumberOfFunctions;
const std::size_t fixed_names_addr = get_file_offset(fs, exprt.AddressOfNames, h);
const std::size_t fixed_ordinals_addr = get_file_offset(fs, exprt.AddressOfNameOrdinals, h);
Expand All @@ -359,6 +359,10 @@ class pe_info {
fs.seekg(fixed_ordinals_addr + i * sizeof(ordinal));
read_raw(fs, ordinal);
std::cerr << "!!!!!! LOOP exported_symbols ordinal " << ordinal << "\n";
if (ordinal >= exported_symbols) {
std::cerr << "!!!!!! LOOP clang-win exiting\n";
continue;
}

// getting function addr
fs.seekg(fixed_functions_addr + ordinal * sizeof(ptr));
Expand Down

0 comments on commit 41869d5

Please sign in to comment.