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

Replace sprintf with snprintf #20

Merged
merged 1 commit into from
Jul 27, 2024
Merged

Replace sprintf with snprintf #20

merged 1 commit into from
Jul 27, 2024

Commits on Jul 26, 2024

  1. Replace sprintf with snprintf

    In C99 7.19.6.5 sprintf, "If copying takes place between objects
    that overlap, the behavior is undefined".
    
    Replace sprintf with snprintf and provide a clear buffer size to
    ensure undefined behavior does not occur.
    
    And the sizeof(buff) + 1 includes the null terminator.
    jouae committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    07b3bf8 View commit details
    Browse the repository at this point in the history