mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Fix wpa_psk_file parser error case handling
str_token() can return NULL for the name if the remaining token contains
only the delimiter. Fix this to avoid NULL pointer dereference with a
corner case of an invalid value used in the configuration.
Fixes: ec5c39a557
("AP: Allow identifying which passphrase station used with wpa_psk_file")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
5a3a131993
commit
2fae58fdc1
@ -303,6 +303,8 @@ static int hostapd_config_read_wpa_psk(const char *fname,
|
|||||||
break;
|
break;
|
||||||
context2 = NULL;
|
context2 = NULL;
|
||||||
name = str_token(token, "=", &context2);
|
name = str_token(token, "=", &context2);
|
||||||
|
if (!name)
|
||||||
|
break;
|
||||||
value = str_token(token, "", &context2);
|
value = str_token(token, "", &context2);
|
||||||
if (!value)
|
if (!value)
|
||||||
value = "";
|
value = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user