[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: avoid assert() upon malformed IB
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: avoid assert() upon malformed IBANs |
Date: |
Wed, 10 Jun 2020 16:15:53 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new ab1fc20a avoid assert() upon malformed IBANs
ab1fc20a is described below
commit ab1fc20a450d57db3d76f04ab6176ee1ff0e59b1
Author: MS <ms@taler.net>
AuthorDate: Wed Jun 10 16:15:48 2020 +0200
avoid assert() upon malformed IBANs
---
src/json/json_wire.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/json/json_wire.c b/src/json/json_wire.c
index 1cd3fd7d..fc3d67a8 100644
--- a/src/json/json_wire.c
+++ b/src/json/json_wire.c
@@ -281,7 +281,15 @@ validate_iban (const char *iban)
j++;
}
for (j = 0; '\0' != nbuf[j]; j++)
- GNUNET_assert (isdigit ( (unsigned char) nbuf[j]));
+ {
+ if (! isdigit ( (unsigned char) nbuf[j]))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "IBAN `%s' didn't convert to numeric format\n",
+ iban);
+ return GNUNET_NO;
+ }
+ }
GNUNET_assert (sizeof(dividend) >= 8);
remainder = 0;
for (unsigned int i = 0; i<j; i += 16)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: avoid assert() upon malformed IBANs,
gnunet <=