diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-02-15 22:05:37 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-02-15 22:05:37 +0100 |
commit | e6c5262c9ec9c6a930bff99f66eaa8f6cf509f08 (patch) | |
tree | f8090d4d128dddbe4ea94d65863a138b1161a30e /src/lib | |
parent | c1a58ef343302bd2ded679986f637865adecc961 (diff) | |
download | exchange-e6c5262c9ec9c6a930bff99f66eaa8f6cf509f08.tar.xz |
fix currency parsing in deserialization logic (resolves #6744)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/exchange_api_handle.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index f362bc5e5..8c7cbeda0 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -677,6 +677,7 @@ decode_keys_json (const json_t *resp_obj, struct TALER_ExchangeSignatureP sig; struct GNUNET_HashContext *hash_context; struct TALER_ExchangePublicKeyP pub; + const char *currency; struct GNUNET_JSON_Specification mspec[] = { GNUNET_JSON_spec_fixed_auto ("eddsa_sig", &sig), @@ -691,7 +692,7 @@ decode_keys_json (const json_t *resp_obj, TALER_JSON_spec_relative_time ("reserve_closing_delay", &key_data->reserve_closing_delay), GNUNET_JSON_spec_string ("currency", - &key_data->currency), + ¤cy), GNUNET_JSON_spec_end () }; @@ -755,6 +756,7 @@ decode_keys_json (const json_t *resp_obj, GNUNET_JSON_parse (resp_obj, (check_sig) ? mspec : &mspec[2], NULL, NULL)); + key_data->currency = GNUNET_strdup (currency); /* parse the master public key and issue date of the response */ if (check_sig) hash_context = GNUNET_CRYPTO_hash_context_start (); |