commit 0ade612b3e603a874cf711d79a398c4b9b29cf82 parent 87a1c5514582092f29f522c75fc1e7b35a1103df Author: James Prestwood <prestwoj@gmail.com> Date: Wed, 16 Oct 2019 16:36:30 -0700 hotspot: check if HESSID parses correctly Diffstat:
| M | src/hotspot.c | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/hotspot.c b/src/hotspot.c @@ -342,7 +342,12 @@ static struct hs20_config *hs20_config_new(struct l_settings *settings, config = l_new(struct hs20_config, 1); if (hessid_str) { - util_string_to_address(hessid_str, config->hessid); + if (!util_string_to_address(hessid_str, config->hessid)) { + l_error("Invalid HESSID in settings"); + l_free(config); + goto free_values; + } + l_free(hessid_str); }