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 printf string precision handling and add tests #70

Merged
merged 4 commits into from
Mar 18, 2024

Conversation

qookei
Copy link
Member

@qookei qookei commented Mar 17, 2024

No description provided.

qookei added 4 commits March 18, 2024 00:12
Previously we were assuming that the input string is always
null-terminated, which could lead to an out-of-bounds access if that
wasn't the case.
The test cases are adapted from mlibc's tests/ansi/sprintf.c.
@d-tatianin
Copy link

LGTM! strnlen will also come in handy

@qookei qookei merged commit dd9d1ea into managarm:master Mar 18, 2024
1 check 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.

2 participants