]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Fix ppkey parsing
authorJouni Malinen <jouni@codeaurora.org>
Mon, 2 Nov 2020 14:31:02 +0000 (16:31 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 2 Nov 2020 14:31:02 +0000 (16:31 +0200)
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 <jouni@codeaurora.org>
src/common/dpp.c

index 0bda85fe7b3ecd5211c743bf33dbf2f72261ddb2..3c8c7682d514d8f79e92d743cec6e00b47990de8 100644 (file)
@@ -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)