From 589bf1f7a962e006153125ba9bc2a2a7f21a0db6 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 2 Nov 2020 16:31:02 +0200 Subject: [PATCH] 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 --- src/common/dpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)