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: 9c1fbff074 ("DPP2: Generate a privacy protection key for Configurator")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-11-02 16:31:02 +02:00 committed by Jouni Malinen
parent 79e3f08d3c
commit 589bf1f7a9

View File

@ -4190,7 +4190,7 @@ int dpp_configurator_add(struct dpp_global *dpp, const char *cmd)
} }
if (ppkey) { if (ppkey) {
pp_key_len = os_strlen(key) / 2; pp_key_len = os_strlen(ppkey) / 2;
pp_key = os_malloc(pp_key_len); pp_key = os_malloc(pp_key_len);
if (!pp_key || if (!pp_key ||
hexstr2bin(ppkey, pp_key, pp_key_len) < 0) hexstr2bin(ppkey, pp_key, pp_key_len) < 0)