Skip to content

Fix printf format string safety in showhardware.sh#14

Closed
Copilot wants to merge 2 commits intoUpdated-scripts-and-readme-2026-Febfrom
copilot/sub-pr-8-one-more-time
Closed

Fix printf format string safety in showhardware.sh#14
Copilot wants to merge 2 commits intoUpdated-scripts-and-readme-2026-Febfrom
copilot/sub-pr-8-one-more-time

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 25, 2026

All printf calls used expanded variables directly as the format string, making output vulnerable to misinterpretation of any % sequences present in HEADER or FOOTER.

Changes

  • showhardware.sh: Replace variable-as-format-string printf calls with a constant %b format string, passing $HEADER and $FOOTER as arguments

Before:

printf "$HEADER System Information $FOOTER"

After:

printf "%b System Information %b" "$HEADER" "$FOOTER"

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: andreak3779 <11012375+andreak3779@users.noreply.github.com>
Copilot AI changed the title [WIP] Update shell configuration instructions in README Fix printf format string safety in showhardware.sh Feb 25, 2026
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