aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mint-tools/taler-mint-reservemod.c12
-rw-r--r--src/mint/taler-mint-httpd_parsing.c2
2 files changed, 10 insertions, 4 deletions
diff --git a/src/mint-tools/taler-mint-reservemod.c b/src/mint-tools/taler-mint-reservemod.c
index ce35ecc4c..762830783 100644
--- a/src/mint-tools/taler-mint-reservemod.c
+++ b/src/mint-tools/taler-mint-reservemod.c
@@ -162,9 +162,15 @@ reservemod_add (struct TALER_Amount denom)
"balance_fraction",
"balance_currency",
&old_denom));
- TALER_amount_add (&new_denom,
- &old_denom,
- &denom);
+ if (GNUNET_OK !=
+ TALER_amount_add (&new_denom,
+ &old_denom,
+ &denom))
+ {
+ fprintf (stderr,
+ "Integer overflow when computing new balance!\n");
+ return GNUNET_SYSERR;
+ }
TALER_amount_hton (&new_denom_nbo,
&new_denom);
result = PQexecParams (db_conn,
diff --git a/src/mint/taler-mint-httpd_parsing.c b/src/mint/taler-mint-httpd_parsing.c
index 450065c61..a1c189176 100644
--- a/src/mint/taler-mint-httpd_parsing.c
+++ b/src/mint/taler-mint-httpd_parsing.c
@@ -1041,7 +1041,7 @@ TMH_PARSE_amount_json (struct MHD_Connection *connection,
amount->fraction = (uint32_t) fraction;
GNUNET_assert (strlen (TMH_mint_currency_string) < TALER_CURRENCY_LEN);
strcpy (amount->currency, TMH_mint_currency_string);
- TALER_amount_normalize (amount);
+ (void) TALER_amount_normalize (amount);
return GNUNET_OK;
}