aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/crypto_confirmation.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/crypto_confirmation.c b/src/util/crypto_confirmation.c
index 204c373da..5670f5560 100644
--- a/src/util/crypto_confirmation.c
+++ b/src/util/crypto_confirmation.c
@@ -261,6 +261,13 @@ TALER_build_pos_confirmation (const char *pos_key,
struct GNUNET_HashCode hkey;
struct TALER_AmountNBO ntotal;
+ if ( (NULL == total) ||
+ (GNUNET_YES !=
+ TALER_amount_is_valid (total) ) )
+ {
+ GNUNET_break_op (0);
+ return GNUNET_SYSERR;
+ }
TALER_amount_hton (&ntotal,
total);
GNUNET_assert (GNUNET_YES ==