summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-06-03 10:44:57 +0200
committerChristian Grothoff <christian@grothoff.org>2019-06-03 10:44:57 +0200
commitc241694ccb6de36971a27f144433521f30f92fa3 (patch)
tree6d42cca8040e0f568ce7550290c30edb18b26b34 /src/exchange
parent2cea0eb4d2ee117a48703370a4ff4be6b275df0f (diff)
downloadexchange-c241694ccb6de36971a27f144433521f30f92fa3.tar.gz
exchange-c241694ccb6de36971a27f144433521f30f92fa3.tar.bz2
exchange-c241694ccb6de36971a27f144433521f30f92fa3.zip
check more return values
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-aggregator.c11
-rw-r--r--src/exchange/taler-exchange-httpd_refresh_reveal.c7
-rw-r--r--src/exchange/taler-exchange-httpd_test.c11
3 files changed, 19 insertions, 10 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index 299b892f..fda0ad50 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -704,8 +704,15 @@ deposit_cb (void *cls,
GNUNET_break (0);
return GNUNET_DB_STATUS_HARD_ERROR;
}
- TALER_JSON_merchant_wire_signature_hash (wire,
- &au->h_wire);
+ if (GNUNET_OK !=
+ TALER_JSON_merchant_wire_signature_hash (wire,
+ &au->h_wire))
+ {
+ GNUNET_break (0);
+ json_decref (au->wire);
+ au->wire = NULL;
+ return GNUNET_DB_STATUS_HARD_ERROR;
+ }
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
&au->wtid,
sizeof (au->wtid));
diff --git a/src/exchange/taler-exchange-httpd_refresh_reveal.c b/src/exchange/taler-exchange-httpd_refresh_reveal.c
index 25de5f1f..0aee1982 100644
--- a/src/exchange/taler-exchange-httpd_refresh_reveal.c
+++ b/src/exchange/taler-exchange-httpd_refresh_reveal.c
@@ -366,9 +366,10 @@ refresh_reveal_transaction (void *cls,
TALER_planchet_setup_refresh (&ts,
j,
&ps);
- TALER_planchet_prepare (rcd->dk,
- &ps,
- &pd);
+ GNUNET_assert (GNUNET_OK ==
+ TALER_planchet_prepare (rcd->dk,
+ &ps,
+ &pd));
rcd->coin_ev = pd.coin_ev;
rcd->coin_ev_size = pd.coin_ev_size;
}
diff --git a/src/exchange/taler-exchange-httpd_test.c b/src/exchange/taler-exchange-httpd_test.c
index 731da36c..73ce0e55 100644
--- a/src/exchange/taler-exchange-httpd_test.c
+++ b/src/exchange/taler-exchange-httpd_test.c
@@ -226,11 +226,12 @@ TEH_TEST_handler_test_hkdf (struct TEH_RequestHandler *rh,
json_decref (json);
if (GNUNET_YES != res)
return (GNUNET_NO == res) ? MHD_YES : MHD_NO;
- GNUNET_CRYPTO_kdf (&hc, sizeof (hc),
- "salty", strlen ("salty"),
- in_ptr,
- in_ptr_size,
- NULL, 0);
+ GNUNET_assert (GNUNET_YES ==
+ GNUNET_CRYPTO_kdf (&hc, sizeof (hc),
+ "salty", strlen ("salty"),
+ in_ptr,
+ in_ptr_size,
+ NULL, 0));
GNUNET_JSON_parse_free (spec);
json = GNUNET_JSON_from_data_auto (&hc);
return TEH_RESPONSE_reply_json_pack (connection,