Message ID | 20231116191528.364340-1-prestwoj@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | [v3,1/3] dpp-util: store SSID as string, not raw buffer | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
prestwoj/iwd-alpine-ci-fetch | success | Fetch PR |
prestwoj/iwd-ci-gitlint | success | GitLint |
prestwoj/iwd-ci-fetch | success | Fetch PR |
prestwoj/iwd-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-alpine-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-ci-build | success | Build - Configure |
prestwoj/iwd-alpine-ci-build | success | Build - Configure |
prestwoj/iwd-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-alpine-ci-incremental_build | fail | Make FAIL (patch 0): src/dpp.c: In function 'dpp_handle_config_response_frame': src/dpp.c:1088:33: error: 'ssid_len' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1088 | params.ssid_len = ssid_len; | ~~~~~~~~~~~~~~~~^~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:2539: src/dpp.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1713: all] Error 2 |
prestwoj/iwd-ci-makecheck | success | Make Check |
prestwoj/iwd-ci-clang | success | clang PASS |
prestwoj/iwd-alpine-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-alpine-ci-makecheck | success | Make Check |
prestwoj/iwd-ci-incremental_build | success | Incremental Build with patches |
prestwoj/iwd-ci-testrunner | success | test-runner PASS |
Hi James, On 11/16/23 13:15, James Prestwood wrote: > 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(-) > All applied, thanks. Regards, -Denis
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;