Skip to content

Commit

Permalink
Windows & ARM32 build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Feb 15, 2025
1 parent 6761851 commit af3536f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/PE/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ span<uint8_t> get_payload(Binary& bin, const details::pe_debug& dbg, Section*& s
return {};
}

if (check_overflow((uint32_t)delta, dbg.SizeOfData, overlay.size())) {
if (check_overflow<uint64_t>((uint32_t)delta, dbg.SizeOfData, overlay.size())) {
return {};
}

Expand Down
2 changes: 1 addition & 1 deletion src/PE/debug/Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ span<uint8_t> Debug::get_payload(Section& section, uint32_t /*rva*/,
return {};
}

if (check_overflow((uint32_t)rel_offset, size, content.size())) {
if (check_overflow<uint64_t>((uint32_t)rel_offset, size, content.size())) {
return {};
}

Expand Down
1 change: 1 addition & 0 deletions src/paging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "LIEF/ELF/Binary.hpp"
#include "LIEF/MachO/Binary.hpp"
#include "LIEF/PE/Binary.hpp"
#include "LIEF/PE/AuxiliarySymbol.hpp"

namespace LIEF {

Expand Down

0 comments on commit af3536f

Please sign in to comment.