Skip to content

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

Merged
mjcarroll merged 1 commit intorollingfrom
clalancette/fix-format-security
Apr 20, 2023
Merged

Fix a format-security warning when building with clang.#1064
mjcarroll merged 1 commit intorollingfrom
clalancette/fix-format-security

Conversation

@clalancette
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

4 participants