diff options
author | brooks <brooks@FreeBSD.org> | 2005-10-28 21:57:04 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2005-10-28 21:57:04 +0000 |
commit | 919b41158615e0b3ac3e7405d31612743e2ca86a (patch) | |
tree | 938314e761ea8a6e5b78bae260b38249640dade8 | |
parent | bed22d7cab753360153b01e18e081ebdb4835596 (diff) | |
download | FreeBSD-src-919b41158615e0b3ac3e7405d31612743e2ca86a.zip FreeBSD-src-919b41158615e0b3ac3e7405d31612743e2ca86a.tar.gz |
Don't crash when given an invalid nwkey string.
PR: misc/88159
-rw-r--r-- | sbin/ifconfig/ifieee80211.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index 4f3eac4..6b348af 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -322,6 +322,8 @@ set80211nwkey(const char *val, int d, int s, const struct afswtch *rafp) bzero(data, sizeof(data)); len = sizeof(data); val = get_string(val, ",", data, &len); + if (val == NULL) + exit(1); set80211(s, IEEE80211_IOC_WEPKEY, i, len, data); } |