From e7682b3f8dce9e7be1ced921fc6d8d84020e99d8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 10 Nov 2018 17:39:02 +0100 Subject: [PATCH] fix potential use of uninitialized hash_context --- src/exchange-lib/exchange_api_handle.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c index 895d1f1dd..d7fa65fad 100644 --- a/src/exchange-lib/exchange_api_handle.c +++ b/src/exchange-lib/exchange_api_handle.c @@ -583,6 +583,7 @@ decode_keys_json (const json_t *resp_obj, key_data->version = GNUNET_strdup (ver); } + hash_context = NULL; EXITIF (GNUNET_OK != GNUNET_JSON_parse (resp_obj, (check_sig) ? mspec : &mspec[2], @@ -591,8 +592,6 @@ decode_keys_json (const json_t *resp_obj, /* parse the master public key and issue date of the response */ if (check_sig) hash_context = GNUNET_CRYPTO_hash_context_start (); - else - hash_context = NULL; /* parse the signing keys */ {