Skip to content

Check Include path truncation in sshd config#1023

Open
ejohnstown wants to merge 1 commit into
wolfSSL:masterfrom
ejohnstown:raspi
Open

Check Include path truncation in sshd config#1023
ejohnstown wants to merge 1 commit into
wolfSSL:masterfrom
ejohnstown:raspi

Conversation

@ejohnstown

Copy link
Copy Markdown
Contributor

HandleInclude built the wildcard include path with WSNPRINTF without checking the result, silently truncating over-long paths (flagged by GCC 12 as -Werror=format-truncation). Merge the duplicate WSNPRINTF calls and return WS_INVALID_PATH_E when the path does not fit.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #1023

Scan targets checked: wolfssh-bugs, wolfssh-src

No new issues found in the changed files. ✅

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Prevents silently truncated Include paths in wolfsshd config handling by validating WSNPRINTF results and returning WS_INVALID_PATH_E when the generated path does not fit.

Changes:

  • Consolidates duplicate WSNPRINTF calls into a single path-build operation.
  • Detects over-long include paths and returns WS_INVALID_PATH_E instead of proceeding with a truncated path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/wolfsshd/configuration.c Outdated
HandleInclude built the wildcard include path with WSNPRINTF without
checking the result, silently truncating over-long paths (flagged by
GCC 12 as -Werror=format-truncation). Merge the duplicate WSNPRINTF
calls and return WS_INVALID_PATH_E when the path does not fit.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #1023

Scan targets checked: wolfssh-bugs, wolfssh-src

No new issues found in the changed files. ✅

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread apps/wolfsshd/configuration.c
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