diff mbox series

[v2,1/3] dpp-util: store SSID as string, not raw buffer

Message ID 20231116184459.292601-1-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series [v2,1/3] dpp-util: store SSID as string, not raw buffer | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success

Commit Message

James Prestwood Nov. 16, 2023, 6:44 p.m. UTC
Nearly every use of the ssid member first has to memcpy it to a
buffer and NULL terminate. Instead just store the ssid as a
string when creating/parsing from JSON.
---
 src/dpp-util.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/dpp-util.h b/src/dpp-util.h
index b5fc029c..222ba053 100644
--- a/src/dpp-util.h
+++ b/src/dpp-util.h
@@ -112,7 +112,7 @@  enum dpp_attribute_type {
 };
 
 struct dpp_configuration {
-	uint8_t ssid[32];
+	char ssid[33];
 	size_t ssid_len;
 	uint32_t akm_suites;
 	char *passphrase;