Skip to content

Conversation

@Mirza-Samad-Ahmed-Baig
Copy link

@Mirza-Samad-Ahmed-Baig Mirza-Samad-Ahmed-Baig commented Sep 1, 2025

This pull request resolves a critical security vulnerability in the getprocessname.c file. The existing code used the sprintf unction, which is known to be unsafe and can lead to buffer overflows.

The fix replaces the sprintf call with snprintf, a safer alternative that prevents buffer overflows by allowing the maximum number of bytes to be written to the buffer to be specified.

This change improves the security and stability of the application.

Changes:
Replaced sprintf with snprintf in mars/comm/android/getprocessname.c

@tencent-adm
Copy link
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Mirza-Samad-Ahmed-Baig
Copy link
Author

CLA Signed.

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