DPP: Fix DPP_RELAY_ADD_CONTROLLER command parsing
hostapd_dpp_add_controller() ended up trying to parse the IP address
without nul terminating it. This might work with some C libraries, but
not all. And anyway, this was already supposed to nul terminate the
string since a temporary copy is created of the constant string. Fix
this by adding the missed replacement of the space with nul.
Fixes: bfe3cfc382
("DPP: Allow Relay connections to Controllers to be added and removed")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
05d3681f3e
commit
54706957e3
1 changed files with 1 additions and 1 deletions
|
@ -3427,7 +3427,7 @@ int hostapd_dpp_add_controller(struct hostapd_data *hapd, const char *cmd)
|
|||
pos = os_strchr(tmp, ' ');
|
||||
if (!pos)
|
||||
goto fail;
|
||||
pos++;
|
||||
*pos++ = '\0';
|
||||
if (hostapd_parse_ip_addr(tmp, &addr) < 0 ||
|
||||
hexstr2bin(pos, pkhash, SHA256_MAC_LEN) < 0)
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in a new issue