Skip to contentSkip to conversation

hotspot: check if HESSID parses correctly

PATCH Applied James Prestwood 2 participants 2 messages Oct 16, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 hotspot: check if HESSID parses correctly

---
 src/hotspot.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
src/hotspot.c +6 -1
index ad8af37c..60a2e2de 100644
@@ -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);
 	}
 
Signature · 1 line
2.17.1
#1 lore raw

Hi James,

Quoted 4 lines · James Prestwood
---
  src/hotspot.c | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)

Applied, thanks.

Regards,
-Denis