diff options
author | 2007-03-01 10:55:14 +0000 | |
---|---|---|
committer | 2007-03-01 10:55:14 +0000 | |
commit | 2581ba88887ee943f2e585b26eca99d240a40767 (patch) | |
tree | a70c5aafe57701ef34519757e90f34bf92fe0a96 | |
parent | Remove ChallengeResponseAuthentication support inside a Match (diff) | |
download | wireguard-openbsd-2581ba88887ee943f2e585b26eca99d240a40767.tar.xz wireguard-openbsd-2581ba88887ee943f2e585b26eca99d240a40767.zip |
In acx_set_probe_resp_tmplt () ieee80211_beacon_alloc() could fail so check the
return value. Stolen from acx_set_beacon_tmplt() that already does this check.
-rw-r--r-- | sys/dev/ic/acx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c index 5164f046cd5..5911ded5a6f 100644 --- a/sys/dev/ic/acx.c +++ b/sys/dev/ic/acx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acx.c,v 1.65 2007/02/28 09:26:26 claudio Exp $ */ +/* $OpenBSD: acx.c,v 1.66 2007/03/01 10:55:14 claudio Exp $ */ /* * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> @@ -2333,6 +2333,8 @@ acx_set_probe_resp_tmplt(struct acx_softc *sc, struct ieee80211_node *ni) bzero(&resp, sizeof(resp)); m = ieee80211_beacon_alloc(ic, ni); + if (m == NULL) + return (1); m_copydata(m, 0, m->m_pkthdr.len, (caddr_t)&resp.data); len = m->m_pkthdr.len + sizeof(resp.size); m_freem(m); |