From: Jouni Malinen Date: Wed, 22 Feb 2023 15:01:58 +0000 (+0200) Subject: DPP: Fix @CONF-OBJ-SEP@ parsing for multiple configs X-Git-Tag: hostap_2_11~1271 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7292e30b7f3f04bd9aa90b6a2c67f9cb2814e191;p=thirdparty%2Fhostap.git DPP: Fix @CONF-OBJ-SEP@ parsing for multiple configs The first call to dpp_configuration_parse_helper() was supposed to use the separately prepared tmp string with only the first configuration entry, but it ended up using the full string that included both configuration entries. This could result in the first configObject getting a mix of parameters from both entries. Fix the parsing to use only the text before the @CONF-OBJ-SEP@ separator for the first entry. Fixes: 7eb06a33697f ("DPP2: Allow multiple Config Objects to be build on Configurator") Signed-off-by: Jouni Malinen --- diff --git a/src/common/dpp.c b/src/common/dpp.c index 6b72a23ff..9d3d306da 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -1342,7 +1342,7 @@ static int dpp_configuration_parse(struct dpp_authentication *auth, goto fail; os_memcpy(tmp, cmd, len); tmp[len] = '\0'; - res = dpp_configuration_parse_helper(auth, cmd, 0); + res = dpp_configuration_parse_helper(auth, tmp, 0); str_clear_free(tmp); if (res) goto fail;