CWE-686 in tools/elf2uf2/main.cpp:132 #1584

Closed
opened 2023-12-18 22:55:03 -06:00 by tjko · 3 comments
tjko commented 2023-12-18 22:55:03 -06:00 (Migrated from github.com)

Github code scanning is flagging CWE-686 in tools/elf2uf2/main.cpp:132

This argument should be of type 'void *' but is of type 'unsigned int'.
CodeQL
Github code scanning is flagging CWE-686 in _tools/elf2uf2/main.cpp:132_ ``` This argument should be of type 'void *' but is of type 'unsigned int'. CodeQL ```
geurtv commented 2023-12-19 02:17:01 -06:00 (Migrated from github.com)

The type unsigned int is correct, the %p in the format string is what's wrong. Should probably be 0x%08x instead.

The type `unsigned int` is correct, the `%p` in the format string is what's wrong. Should probably be `0x%08x` instead.
tjko commented 2023-12-19 02:34:08 -06:00 (Migrated from github.com)

Looking the other other similar calls, I updated the pull request to use %08x as that seems to match how addresses are printed in the surrounding code...

Looking the other other similar calls, I updated the pull request to use `%08x` as that seems to match how addresses are printed in the surrounding code...
kilograham commented 2024-05-18 19:01:33 -05:00 (Migrated from github.com)

merged into develop

merged into develop
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#1584
No description provided.