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 remaining 4 calls to sprintf with snprintf #3423

Closed
seanm opened this issue Nov 1, 2022 · 2 comments · Fixed by #3431
Closed

Replace remaining 4 calls to sprintf with snprintf #3423

seanm opened this issue Nov 1, 2022 · 2 comments · Fixed by #3431
Assignees
Labels

Comments

@seanm
Copy link
Contributor

seanm commented Nov 1, 2022

After #3421 there are still 4 uses of sprintf that should be replaced with snprintf.

@seanm seanm added the bug label Nov 1, 2022
@kbevers
Copy link
Member

kbevers commented Nov 1, 2022

Could you point out where they are and why they are complicated to get rid of?

@seanm
Copy link
Contributor Author

seanm commented Nov 1, 2022

All 4 are in rtodms. The complication is:

  1. rtodms takes a buffer (s), but not its size. The function signature should probably change to take the size of the s buffer too.
  2. s gets aliased to ss
  3. there is pointer arithmetic on ss
  4. ss is what's passed to sprintf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants