diff options
author | sam <sam@FreeBSD.org> | 2003-06-29 20:10:54 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-06-29 20:10:54 +0000 |
commit | 1fb2cade2b075d1dddffb36b809b297aa5df90a5 (patch) | |
tree | b71e40a72b8afafcd1bb00911dad8127e3e3f3d2 /sys | |
parent | 0269d0e1b4a66195bff5b7d89015c63b8c4bc82e (diff) | |
download | FreeBSD-src-1fb2cade2b075d1dddffb36b809b297aa5df90a5.zip FreeBSD-src-1fb2cade2b075d1dddffb36b809b297aa5df90a5.tar.gz |
add safeguard against (bogus) null channel parameter
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 97654ba..1e0db22 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -197,10 +197,13 @@ ieee80211_chan2ieee(struct ieee80211com *ic, struct ieee80211_channel *c) return c - ic->ic_channels; else if (c == IEEE80211_CHAN_ANYC) return IEEE80211_CHAN_ANY; - else { + else if (c != NULL) { if_printf(&ic->ic_if, "invalid channel freq %u flags %x\n", c->ic_freq, c->ic_flags); return 0; /* XXX */ + } else { + if_printf(&ic->ic_if, "invalid channel (NULL)\n"); + return 0; /* XXX */ } } |