summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-05-01 23:11:11 +0200
committerChristian Grothoff <christian@grothoff.org>2023-05-01 23:11:11 +0200
commita03ce46d2a3a1448b20b0f3cb2dbabe941e7b826 (patch)
treedeab530d9de984f79b76531c9547e4df9a4f0df5 /src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
parent3db683d6e794c72448824d1e4ed75d6636bf3b22 (diff)
downloadmerchant-a03ce46d2a3a1448b20b0f3cb2dbabe941e7b826.tar.gz
merchant-a03ce46d2a3a1448b20b0f3cb2dbabe941e7b826.tar.bz2
merchant-a03ce46d2a3a1448b20b0f3cb2dbabe941e7b826.zip
fix various memory-use issues
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
index 283321db..3ffac7f3 100644
--- a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
+++ b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c
@@ -124,9 +124,19 @@ authorize_tip (const struct TMH_RequestHandler *rh,
taler_tip_uri = TMH_make_taler_tip_uri (connection,
&tip_id,
hc->instance->settings.id);
+ if (NULL == taler_tip_uri)
+ {
+ GNUNET_break_op (0);
+ return TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_GENERIC_PARAMETER_MISSING,
+ "host");
+ }
tip_status_url = TMH_make_tip_status_url (connection,
&tip_id,
hc->instance->settings.id);
+ GNUNET_assert (NULL != tip_status_url);
+ GNUNET_assert (! GNUNET_TIME_absolute_is_zero (expiration.abs_time));
res = TALER_MHD_REPLY_JSON_PACK (
connection,
MHD_HTTP_OK,