Skip to content

Coverity findings#1549

Merged
troglobit merged 2 commits into
mainfrom
coverity-findings
Jun 27, 2026
Merged

Coverity findings#1549
troglobit merged 2 commits into
mainfrom
coverity-findings

Conversation

@troglobit

Copy link
Copy Markdown
Contributor

Description

Fixes to findings from weekly Coverity Scan

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

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>
@troglobit troglobit requested a review from mattiaswal June 27, 2026 05:28
@troglobit troglobit merged commit 763750b into main Jun 27, 2026
8 of 9 checks passed
@troglobit troglobit deleted the coverity-findings branch June 27, 2026 07:45
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