Coverity findings#1549
Merged
Merged
Conversation
lydx_get_cattr() yields NULL for an absent leaf or a failed radio component lookup; that NULL was passed straight to strcmp() on several WiFi paths (wifi_chan_to_freq, the wifi_gen_mesh width branches, wifi_find_higher_band_twin, dep_radio_components), risking a crash. Guard each value before use. Fixes Coverity CID 561387, 561389, 561390, 561391, 561392. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
In netdag_gen_ethtool_autoneg() the unmapped and "exactly one entry" checks already guarantee a forced PMD link mode is selected, but Coverity cannot see the correlation and flags the later deref. Fold !forced into the entry-count guard to make the invariant explicit. Fixes Coverity CID 561388. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
mattiaswal
approved these changes
Jun 27, 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.
Description
Fixes to findings from weekly Coverity Scan
Checklist
Tick relevant boxes, this PR is-a or has-a: