Skip to content

Commit

Permalink
Fix CWE-686 in tools/elf2uf2/main.cpp:132 (#1585)
Browse files Browse the repository at this point in the history
* Fix CWE-686: This argument should be of type 'void *' but is of type 'unsigned int'.

* Switch %p to %08x.
  • Loading branch information
tjko authored Jan 8, 2024
1 parent d7bbadb commit 3274cc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/elf2uf2/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int check_address_range(const address_ranges& valid_ranges, uint32_t addr, uint3
for(const auto& range : valid_ranges) {
if (range.from <= addr && range.to >= addr + size) {
if (range.type == address_range::type::NO_CONTENTS && !uninitialized) {
return fail(ERROR_INCOMPATIBLE, "ELF contains memory contents for uninitialized memory at %p", addr);
return fail(ERROR_INCOMPATIBLE, "ELF contains memory contents for uninitialized memory at %08x", addr);
}
ar = range;
if (verbose) {
Expand Down

0 comments on commit 3274cc8

Please sign in to comment.