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

Fix __libc_fatal('*** invalid %N$ use detected ***') #14

Closed
wants to merge 1 commit into from

Conversation

haavee
Copy link
Contributor

@haavee haavee commented Nov 2, 2018

Due to my misunderstanding of exactly how to use printf()'s parameter
field
,
then under some PGTBOX(...) settings and with certain time axis range, the
'sprintf(...)' would trigger an __libc_fatal(...) - terminating the user's
application.

The fatal error was only triggered if DAY number was to be displayed and DAY
number was non-negative.

By a simple permutation of the calling arguments and the parameter field(s)
in the format strings this should not happen anymore.

Due to my misunderstanding of _exactly_ how to use `printf()`'s [parameter
field](https://en.wikipedia.org/wiki/Printf_format_string#Parameter_field),
then under some PGTBOX(...) settings and with certain time axis range, the
'sprintf(...)' would trigger an `__libc_fatal(...)` - terminating the user's
application.

The fatal error was only triggered if DAY number was to be displayed and DAY
number was non-negative.

By a simple permutation of the calling arguments and the parameter field(s)
in the format strings this should not happen anymore.
@haavee haavee closed this Nov 2, 2018
@haavee
Copy link
Contributor Author

haavee commented Nov 2, 2018

OK That contained a completely different edit than I needed! Sorry!

@haavee haavee deleted the pgtbox-__libc_fatal-fix branch November 2, 2018 14:21
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