exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit c79a95c7d22f7cd566275057fd38135eac6b683b
parent 0774fd7020a4f70beb13ddf668686c44f8ebb84c
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 23 Apr 2020 12:02:52 +0200

write overflow check nicer (#6215)

Diffstat:
Msrc/util/amount.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/util/amount.c b/src/util/amount.c @@ -126,7 +126,8 @@ TALER_string_to_amount (const char *str, return GNUNET_SYSERR; } n = *value - '0'; - if ( (amount->value * 10 + n < amount->value) || + if ( (amount->value * 10 < amount->value) || + (amount->value * 10 + n < amount->value) || (amount->value > MAX_AMOUNT_VALUE) ) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING,