HomeFreeBSD

iee80211_hwmp: Don't dereference NULL ni in debug printf.

Description

iee80211_hwmp: Don't dereference NULL ni in debug printf.

In this call to IEEE80211_NOTE, ni is always NULL due to the assignment
a few lines earlier at the start of the function. If debug traces are
enabled, then this will pass an invalid pointer as the 'mac' pointer to
ieee80211_note_mac. Use IEEE80211_DPRINTF which doesn't take a 'ni'
argument instead.

Reported by: GCC -Wstringop-overread
Reviewed by: bz, emaste
Differential Revision: https://reviews.freebsd.org/D37626

Details

Provenance
jhbAuthored on Dec 21 2022, 6:45 PM
Reviewer
bz
Differential Revision
D37626: iee80211_hwmp: Don't dereference NULL ni in debug printf.
Parents
rG9f0c0e6eede6: mrsas: Don't leak a stack pointer value in the softc.
Branches
Unknown
Tags
Unknown