fix currency parsing in deserialization logic (resolves #6744)

This commit is contained in:
Christian Grothoff 2021-02-15 22:05:37 +01:00
parent c1a58ef343
commit e6c5262c9e
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 10 additions and 1 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
taler-exchange (0.9.0-7) unstable; urgency=medium
* Avoid picking up libtalerexchange-dev as a dependency of taler-exchange.
-- Christian Grothoff <grothoff@gnu.org> Mon, 15 Feb 2021 13:02:10 +0100
taler-exchange (0.9.0-6) unstable; urgency=medium
* Fixed a few memory leaks.

View File

@ -1,3 +1,4 @@
usr/bin/taler-exchange-benchmark
usr/include/taler/*
usr/lib/*/libtalertesting.so.*
usr/lib/*/libtalerfakebank.so.*

View File

@ -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),
&currency),
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 ();