F-8824: enable config files without trailing newline - #1156
Conversation
81fef31 to
601d645
Compare
There was a problem hiding this comment.
Pull request overview
Enables known_hosts parsing to handle files whose last line does not end with a trailing newline, and adds regression coverage to prevent reintroducing the issue.
Changes:
- Make
load_der_file()allocate an extra byte and NUL-terminate the buffer past the file contents. - Update
ClientPublicKeyCheck()parsing to avoid clobbering the last byte and to normalize CRLF line endings. - Add a regression test that exercises last-entry matching with
\n, no trailing newline, and\r\n.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| apps/wolfssh/common.c | NUL-terminate loaded file buffers and normalize CRLF in known_hosts parsing. |
| tests/regress.c | Add regression test for known_hosts last-line handling (with/without trailing newline and CRLF). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1156
Scan targets checked: wolfssh-bugs, wolfssh-src
Findings: 5
5 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
601d645 to
bf2d332
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1156
Scan targets checked: wolfssh-bugs, wolfssh-src
Findings: 5
5 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
bf2d332 to
87aa830
Compare
87aa830 to
72d6764
Compare
|
The issue described by F-8824 was already fixed upstream. This fixes the write side of the known_hosts file, and adds testing. |
No description provided.