mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-19 03:14:05 -05:00
DPP2: Check conn->ctrl more consistently
There is no point in checking this pointer against NULL after it has been dereferenced. Move the check to the beginning of the function. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
d42df8d6ce
commit
b93a0ce7bd
@ -9332,6 +9332,9 @@ static int dpp_controller_rx_auth_req(struct dpp_connection *conn,
|
|||||||
u16 r_bootstrap_len, i_bootstrap_len;
|
u16 r_bootstrap_len, i_bootstrap_len;
|
||||||
struct dpp_bootstrap_info *own_bi = NULL, *peer_bi = NULL;
|
struct dpp_bootstrap_info *own_bi = NULL, *peer_bi = NULL;
|
||||||
|
|
||||||
|
if (!conn->ctrl)
|
||||||
|
return 0;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "DPP: Authentication Request");
|
wpa_printf(MSG_DEBUG, "DPP: Authentication Request");
|
||||||
|
|
||||||
r_bootstrap = dpp_get_attr(buf, len, DPP_ATTR_R_BOOTSTRAP_KEY_HASH,
|
r_bootstrap = dpp_get_attr(buf, len, DPP_ATTR_R_BOOTSTRAP_KEY_HASH,
|
||||||
@ -9379,8 +9382,7 @@ static int dpp_controller_rx_auth_req(struct dpp_connection *conn,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conn->ctrl &&
|
if (dpp_set_configurator(conn->ctrl->global, conn->ctrl->global->msg_ctx,
|
||||||
dpp_set_configurator(conn->ctrl->global, conn->ctrl->global->msg_ctx,
|
|
||||||
conn->auth,
|
conn->auth,
|
||||||
conn->ctrl->configurator_params) < 0) {
|
conn->ctrl->configurator_params) < 0) {
|
||||||
dpp_connection_remove(conn);
|
dpp_connection_remove(conn);
|
||||||
|
Loading…
Reference in New Issue
Block a user