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

printf: error on missing hexadecial escape value #7259

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

jfinkels
Copy link
Collaborator

@jfinkels jfinkels commented Feb 2, 2025

Change printf to correctly terminate with an error message when an escape sequence starts with \x but doesn't include a literal hexadecimal value after. For example, before this commit,

printf '\x'

would output \x, but after this commit, it terminates with an error message,

printf: missing hexadecimal number in escape

Fixes #7097

Change `printf` to correctly terminate with an error message when an
escape sequence starts with `\x` but doesn't include a literal
hexadecimal value after. For example, before this commit,

    printf '\x'

would output `\x`, but after this commit, it terminates with an error
message,

    printf: missing hexadecimal number in escape

Fixes uutils#7097
Copy link

github-actions bot commented Feb 2, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre merged commit fc4f39c into uutils:main Feb 2, 2025
65 checks passed
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.

printf: renders \x as a literal but should error due to missing hexadecimal number
2 participants