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 snprintf usage #512

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

Conversation

mtdudek
Copy link

@mtdudek mtdudek commented Jan 28, 2025

Some code used snprintf on std::string objects.
This caused unexpected behaviour where '\0' was printed to the output file.
This pull request adds intermediate char* buffer which is later used to initialize std::string.
This string is later resized to the correct expected length.

Some code used snprintf on std::string objects.
This caused unexpected behaviour where '\0' was printed to the output file.
This commit adds intermediate char* buffer which is later used to
initialize std::string. This string is later resized to the correct
expected length.

Signed-off-by: Maciej Dudek <[email protected]>
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