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(error.c): remove wrong strncpy and use vsnprintf #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Bnz-0
Copy link

@Bnz-0 Bnz-0 commented Nov 26, 2024

This removes a bug where the error message is substituted with the format string and, by using vsnprintf, also possibly exploitable buffer overflows in the creation of the error string.

The bug is reproducible simply by generating some error, and you'll get printed the format string instead of the result, so something like this:

ERROR: Enrollment failed (code=8,native=0,subsystem=0): Invalid header %s value %s found in response

This remove a bug where the error message is substituted with the format string
and, by using vsnprintf, also possibly expoitable buffer overflows
in the creation of the error string
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