diff options
author | Jouni Malinen <j@w1.fi> | 2013-12-27 16:44:21 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2013-12-27 16:48:04 (GMT) |
commit | 477689788c59f62a32c9d76e44838aa22bab0b05 (patch) | |
tree | f94623529883cd2a1e9c49ec48ab7ea68a84f528 | |
parent | 2025cad9b8af457051db0e7171ad48fb8b55843c (diff) | |
download | hostap-477689788c59f62a32c9d76e44838aa22bab0b05.zip hostap-477689788c59f62a32c9d76e44838aa22bab0b05.tar.gz hostap-477689788c59f62a32c9d76e44838aa22bab0b05.tar.bz2 |
WNM: Fix AP processing without wnm_oper driver callback
hostapd_drv_wnm_oper() needs to indicate an error if the driver callback
function is not implemented. Without this, the buf_len argument could
have been left uninitialized which could result in crashing the process.
Signed-hostap: Jouni Malinen <j@w1.fi>
-rw-r--r-- | src/ap/ap_drv_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c index bd5d8b2..893e6d9 100644 --- a/src/ap/ap_drv_ops.c +++ b/src/ap/ap_drv_ops.c @@ -714,7 +714,7 @@ int hostapd_drv_wnm_oper(struct hostapd_data *hapd, enum wnm_oper oper, const u8 *peer, u8 *buf, u16 *buf_len) { if (hapd->driver == NULL || hapd->driver->wnm_oper == NULL) - return 0; + return -1; return hapd->driver->wnm_oper(hapd->drv_priv, oper, peer, buf, buf_len); } |