Coverity: Uninitialized scalar variable#1041
Merged
Merged
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1041
Scan targets checked: wolfssh-bugs, wolfssh-src
No new issues found in the changed files. ✅
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the examples/echoserver user-auth callback logic to address a Coverity report about an uninitialized scalar variable by tightening authType handling and ensuring special auth flows reach their intended handlers.
Changes:
- Removes a redundant early
authTypevalidation block. - Explicitly handles
WOLFSSH_USERAUTH_KEYBOARD_SETUPandWOLFSSH_USERAUTH_NONEso they flow into the map-loop handling instead of falling into an error path. - Adds a final
elsebranch returningWOLFSSH_USERAUTH_INVALID_AUTHTYPEfor unsupported auth types.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1. Remove the check on authType, it is covered already. 2. Add Keyboard Setup to the existing check on authType. 3. Add a branch for User Auth None so it reaches its handler in the map loop rather than the new error case. 4. Add else case for an error. Fixes CID: 637345
7c5c6e5 to
c2f2789
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1041
Scan targets checked: wolfssh-bugs, wolfssh-src
No new issues found in the changed files. ✅
padelsbach
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes CID: 637345