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

Fix a format-security warning when building with clang. #1064

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

clalancette
Copy link
Contributor

In particular, you should never have a "bare" string in a printf-like call; that could potentially access uninitialized memory. Instead, make sure to format the string with %s.

In particular, you should never have a "bare" string
in a printf-like call; that could potentially access
uninitialized memory.  Instead, make sure to format
the string with %s.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@clalancette
Copy link
Contributor Author

clalancette commented Apr 19, 2023

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@mjcarroll mjcarroll merged commit 8dca59e into rolling Apr 20, 2023
@delete-merged-branch delete-merged-branch bot deleted the clalancette/fix-format-security branch April 20, 2023 14:03
mjcarroll added a commit that referenced this pull request Apr 20, 2023
@mjcarroll
Copy link
Member

This shouldn't have been merged as we are currently frozen for Iron.

Acuadros95 pushed a commit to micro-ROS/rcl that referenced this pull request Jun 6, 2023
In particular, you should never have a "bare" string
in a printf-like call; that could potentially access
uninitialized memory.  Instead, make sure to format
the string with %s.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Acuadros95 pushed a commit to micro-ROS/rcl that referenced this pull request Jun 6, 2023
In particular, you should never have a "bare" string
in a printf-like call; that could potentially access
uninitialized memory.  Instead, make sure to format
the string with %s.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
danthony06 pushed a commit to danthony06/rcl that referenced this pull request Jun 14, 2023
In particular, you should never have a "bare" string
in a printf-like call; that could potentially access
uninitialized memory.  Instead, make sure to format
the string with %s.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
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.

None yet

4 participants