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

Convert sprintf to snprintf part 1 #5704

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

JohnAFernandez
Copy link
Contributor

This partially addresses a very common warning from clang when compiling FSO that sprintf is deprecated and needs to be converted to snprintf. Now, I don't think the security issues are a huge deal for us, but on the compilation output, it will print out multiple lines for each occurrence, and we use sprintf upwards of 800 times.

This pr converts about a third of them. Note that the SCP_string overload of sprintf is not affected.

In draft until I can do some basic smoke testing. The changes were not complicated, but they are extensive.

@JohnAFernandez JohnAFernandez added cleanup A modification or rewrite of code to make it more understandable or easier to maintain. sanitizer/stability Issues caught by Address Sanitizer or other third-party tools. labels Oct 22, 2023
@JohnAFernandez JohnAFernandez force-pushed the Convert-to-snprintf-part-1 branch 2 times, most recently from ef83637 to 294770e Compare October 23, 2023 14:25
@JohnAFernandez JohnAFernandez marked this pull request as ready for review December 11, 2023 23:39
@JohnAFernandez
Copy link
Contributor Author

I did not see any odd text behavior when I tested this patch.

@JohnAFernandez JohnAFernandez added the Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle label Jan 24, 2024
@JohnAFernandez JohnAFernandez self-assigned this Jan 27, 2024
@Goober5000 Goober5000 removed the Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup A modification or rewrite of code to make it more understandable or easier to maintain. sanitizer/stability Issues caught by Address Sanitizer or other third-party tools.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants