We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There are some problems with a precision of 0 (an annoying corner case).
The following crash:
printf("% .0d", 0);
printf("%+.0d", 0);
+
This is caused by decrementing a 0 len here: https://github.com/mpaland/printf/blob/master/printf.c#L185
len
printf("%#.0x", 0); is apparently supposed to output an empty string, not 0x. The octal case is correct, though. It seems this was clarified in C11.
printf("%#.0x", 0);
0x
The text was updated successfully, but these errors were encountered:
Wow! This is really serious and leads to out of bounds buffer access! Wondering that coverity didn't catch it.
Sorry, something went wrong.
7075d31
The fix for this bug may have causes #109 .
mpaland
No branches or pull requests
There are some problems with a precision of 0 (an annoying corner case).
The following crash:
printf("% .0d", 0);
(should outputprintf("%+.0d", 0);
(should output+
)This is caused by decrementing a 0
len
here: https://github.com/mpaland/printf/blob/master/printf.c#L185printf("%#.0x", 0);
is apparently supposed to output an empty string, not0x
. The octal case is correct, though. It seems this was clarified in C11.The text was updated successfully, but these errors were encountered: