aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-lib/exchange_api_reserve.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-10-06 20:02:28 +0200
committerChristian Grothoff <christian@grothoff.org>2017-10-06 20:02:28 +0200
commit2f715c27f82584cb65855785144877da628fe35c (patch)
treeaf92de489ba87850dabcac30fe56a9e8640eb4ee /src/exchange-lib/exchange_api_reserve.c
parent1da03b95eb8e13f0e4ebaa79d2096a89b34cb1b2 (diff)
check return value from TALER_JSON_hash
Diffstat (limited to 'src/exchange-lib/exchange_api_reserve.c')
-rw-r--r--src/exchange-lib/exchange_api_reserve.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/exchange-lib/exchange_api_reserve.c b/src/exchange-lib/exchange_api_reserve.c
index 4b5152c50..644a9919c 100644
--- a/src/exchange-lib/exchange_api_reserve.c
+++ b/src/exchange-lib/exchange_api_reserve.c
@@ -354,8 +354,13 @@ parse_reserve_history (struct TALER_EXCHANGE_Handle *exchange,
}
TALER_amount_hton (&rcc.closing_amount,
&amount);
- TALER_JSON_hash (rhistory[off].details.close_details.receiver_account_details,
- &rcc.h_wire);
+ if (GNUNET_OK !=
+ TALER_JSON_hash (rhistory[off].details.close_details.receiver_account_details,
+ &rcc.h_wire))
+ {
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
+ }
rcc.wtid = rhistory[off].details.close_details.wtid;
rcc.purpose.size = htonl (sizeof (rcc));
rcc.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_RESERVE_CLOSED);