Skip to content

Fix format specifiers that do not match the argument types#271

Merged
brarcher merged 2 commits into
libcheck:masterfrom
jamesjer:formatspec
Jun 23, 2020
Merged

Fix format specifiers that do not match the argument types#271
brarcher merged 2 commits into
libcheck:masterfrom
jamesjer:formatspec

Conversation

@jamesjer

Copy link
Copy Markdown
Contributor

In check.h.in, %x is not safe to use with pointers, since it specifies an int-sized value but a pointer is passed in. On some platforms, int is 32 bits and void * is 64 bits.

In check_pack.c, note that t is a length modifier, not a conversion specifier. It must be followed by either d or u; d seems appropriate in this case.

The other changes are fairly obvious mismatches between the argument type and conversion specifier.

@jamesjer

Copy link
Copy Markdown
Contributor Author

This commit fixes #270

@brarcher brarcher merged commit a2c8ab9 into libcheck:master Jun 23, 2020
@brarcher

Copy link
Copy Markdown
Contributor

Thanks for the fixes!

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.

2 participants