From: Jouni Malinen Date: Mon, 2 Nov 2020 14:31:02 +0000 (+0200) Subject: DPP2: Fix ppkey parsing X-Git-Tag: hostap_2_10~790 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=589bf1f7a962e006153125ba9bc2a2a7f21a0db6;p=thirdparty%2Fhostap.git DPP2: Fix ppkey parsing DPP_CONFIGURATOR_ADD processing of the new ppkey parameter had a copy-paste error in determining the correct length of this parameter. Fix that by referencing the correct pointer. Fixes: 9c1fbff07404 ("DPP2: Generate a privacy protection key for Configurator") Signed-off-by: Jouni Malinen --- diff --git a/src/common/dpp.c b/src/common/dpp.c index 0bda85fe7..3c8c7682d 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -4190,7 +4190,7 @@ int dpp_configurator_add(struct dpp_global *dpp, const char *cmd) } if (ppkey) { - pp_key_len = os_strlen(key) / 2; + pp_key_len = os_strlen(ppkey) / 2; pp_key = os_malloc(pp_key_len); if (!pp_key || hexstr2bin(ppkey, pp_key, pp_key_len) < 0)