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

Update digsig_asymmetric.c #836

Closed
wants to merge 1 commit into from
Closed

Update digsig_asymmetric.c #836

wants to merge 1 commit into from

Conversation

Elyrial
Copy link

@Elyrial Elyrial commented Apr 4, 2024

Using snprintf instead of sprintf can help prevent buffer overflows

Using snprintf instead of sprintf can help prevent buffer overflows
@admsev
Copy link

admsev commented May 27, 2024

@gooroodev please explain

@gooroodev
Copy link

Thank you for tagging me, @admsev!

{mistakes: 0, typos: 0, security: 0, performance: 0, code_styling: 0, others: 0}

  1. Summary of Changes:

    • The sprintf function has been replaced with snprintf in the request_asymmetric_key function to ensure buffer overflow protection.
  2. Issues, Bugs, or Typos:

    • No issues, bugs, or typos found.
  3. General Review of Code Quality and Style:

    • The change from sprintf to snprintf improves security by preventing potential buffer overflows.
    • The code is well-structured and follows common practices for error handling and logging.
  4. Suggestions:

    • No additional suggestions are necessary as the change improves security without introducing any new issues.

The code change is appropriate and enhances the security of the function by using snprintf to prevent buffer overflows. No further improvements are needed.

Yours, Gooroo.dev. Feel free to react or reply to this review!

@Elyrial Elyrial closed this by deleting the head repository Jul 15, 2024
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.

3 participants