diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-10-06 20:02:28 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-10-06 20:02:28 +0200 |
commit | 2f715c27f82584cb65855785144877da628fe35c (patch) | |
tree | af92de489ba87850dabcac30fe56a9e8640eb4ee /src/exchange/taler-exchange-httpd_responses.c | |
parent | 1da03b95eb8e13f0e4ebaa79d2096a89b34cb1b2 (diff) | |
download | exchange-2f715c27f82584cb65855785144877da628fe35c.tar.gz exchange-2f715c27f82584cb65855785144877da628fe35c.tar.bz2 exchange-2f715c27f82584cb65855785144877da628fe35c.zip |
check return value from TALER_JSON_hash
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_responses.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index bde14d815..e461a95c7 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -718,6 +718,7 @@ TEH_RESPONSE_compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHisto &deposit_total, &pos->details.bank->amount)) { + GNUNET_break (0); json_decref (json_history); return NULL; } @@ -748,6 +749,7 @@ TEH_RESPONSE_compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHisto &withdraw_total, &value)) { + GNUNET_break (0); json_decref (json_history); return NULL; } @@ -782,6 +784,7 @@ TEH_RESPONSE_compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHisto &deposit_total, &payback->value)) { + GNUNET_break (0); json_decref (json_history); return NULL; } @@ -840,8 +843,14 @@ TEH_RESPONSE_compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHisto TALER_amount_hton (&rcc.closing_fee, &pos->details.closing->closing_fee); rcc.reserve_pub = pos->details.closing->reserve_pub; - TALER_JSON_hash (pos->details.closing->receiver_account_details, - &rcc.h_wire); + if (GNUNET_OK != + TALER_JSON_hash (pos->details.closing->receiver_account_details, + &rcc.h_wire)) + { + GNUNET_break (0); + json_decref (json_history); + return NULL; + } rcc.wtid = pos->details.closing->wtid; TEH_KS_sign (&rcc.purpose, &pub, |