Don't crash when given an invalid nwkey string.

PR:	misc/88159
This commit is contained in:
brooks 2005-10-28 21:57:04 +00:00
parent bed22d7cab
commit 919b411586

View File

@ -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);
}