public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v3 1/3] dpp-util: store SSID as string, not raw buffer
@ 2023-11-16 19:15 James Prestwood
  2023-11-16 19:15 ` [PATCH v3 2/3] dpp: use the new config->ssid member James Prestwood
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: James Prestwood @ 2023-11-16 19:15 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

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 --git a/src/dpp-util.h b/src/dpp-util.h
index 053caf8c..0724ee44 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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-17 15:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-16 19:15 [PATCH v3 1/3] dpp-util: store SSID as string, not raw buffer James Prestwood
2023-11-16 19:15 ` [PATCH v3 2/3] dpp: use the new config->ssid member James Prestwood
2023-11-16 19:15 ` [PATCH v3 3/3] dpp: use the config's SSID to process scan results James Prestwood
2023-11-17 15:48 ` [PATCH v3 1/3] dpp-util: store SSID as string, not raw buffer Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox