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

Use of snprintf over sprintf #33

Merged
merged 2 commits into from
May 23, 2024
Merged

Use of snprintf over sprintf #33

merged 2 commits into from
May 23, 2024

Conversation

neel5481
Copy link
Contributor

Replace the sprintf with snprintf to avoid buffer overflow. Writing too much data to the allocated space can lead to issues such as memory corruption or security threats. Some of the code scanner tool also gives warning for the usage of sprintf.

snprintf helps to prevent buffer overflows by ensuring data does not exceed a specified limit.

Reported by: @BillSmith-EDB

Replace the sprintf with snprintf to avoid buffer overflow. Writing too much data to the allocated space can lead to issues such as memory corruption or security threats. Some of the code scanner tool also gives warning for the usage of sprintf.

snprintf helps to prevent buffer overflows by ensuring data does not exceed a specified limit.

Reported by: BillSmith-EDB
@neel5481 neel5481 merged commit f25eba9 into master May 23, 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.

2 participants