Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WUT_FORMAT_PRINTF and fix some format string bugs. #404

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkosmari
Copy link
Contributor

@dkosmari dkosmari commented Oct 8, 2024

This adds WUT_FORMAT_PRINTF to decorate printf-like functions.

Incidentally, this revealed a few debug prints that had the wrong number of arguments for the format string, or read the wrong number of bytes from an argument (in devoptab_fsa_truncate.cpp, that one was pretty bad.)

Debug prints were also changed to use %p for pointers. I don't think any of those cases could lead to crashes though.

…ike functions.

- Fixed a few format string bugs, in `libwhb/crash.c` and `wutdevoptab`, where there was a
  mismatch of specifiers and arguments that could lead to crashes.

- Made debug prints use `%p` when printing pointers.

--HG--
branch : printf-attribute-hg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant