Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/dev/pci Avoid a NULL deref.



details:   https://anonhg.NetBSD.org/src-all/rev/2d618a272c4e
branches:  trunk
changeset: 989451:2d618a272c4e
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Sun Jan 17 04:06:39 2021 +1100

description:
Avoid a NULL deref.

diffstat:

 sys/dev/pci/if_iwm.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 1d9f5fa2f662 -r 2d618a272c4e sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c      Sun Jan 17 04:05:38 2021 +1100
+++ b/sys/dev/pci/if_iwm.c      Sun Jan 17 04:06:39 2021 +1100
@@ -4095,7 +4095,7 @@
        }
 
        ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh);
-       if (c)
+       if (ni && c)
                ni->ni_chan = c;
 
        if (ni != NULL) {



Home | Main Index | Thread Index | Old Index