[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] 01/06: fix signed calls to isalpha/isdigit
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] 01/06: fix signed calls to isalpha/isdigit/isspace etc. |
Date: |
Fri, 06 Oct 2017 21:11:40 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit e5aed9e5cbe9af294157b8be428385f609c4e066
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Oct 6 19:53:48 2017 +0200
fix signed calls to isalpha/isdigit/isspace etc.
---
src/util/amount.c | 2 +-
src/wire/plugin_wire_sepa.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/util/amount.c b/src/util/amount.c
index e066485..33ba9a2 100644
--- a/src/util/amount.c
+++ b/src/util/amount.c
@@ -52,7 +52,7 @@ TALER_string_to_amount (const char *str,
0,
sizeof (struct TALER_Amount));
/* skip leading whitespace */
- while (isspace(str[0]))
+ while (isspace( (unsigned char) str[0]))
str++;
if ('\0' == str[0])
{
diff --git a/src/wire/plugin_wire_sepa.c b/src/wire/plugin_wire_sepa.c
index 6300d82..f0cef02 100644
--- a/src/wire/plugin_wire_sepa.c
+++ b/src/wire/plugin_wire_sepa.c
@@ -309,7 +309,7 @@ validate_iban (const char *iban)
nbuf = GNUNET_malloc ((len * 2) + 1);
for (i=0, j=0; i < len; i++)
{
- if (isalpha ((int) ibancpy[i]))
+ if (isalpha ((unsigned char) ibancpy[i]))
{
if (2 != snprintf(&nbuf[j],
3,
@@ -326,7 +326,7 @@ validate_iban (const char *iban)
j++;
}
for (j=0;'\0' != nbuf[j];j++)
- GNUNET_assert (isdigit(nbuf[j]));
+ GNUNET_assert (isdigit( (unsigned char) nbuf[j]));
GNUNET_assert (sizeof(dividend) >= 8);
remainder = 0;
for (i=0; i<j; i+=16)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-exchange] branch master updated (85a2d3d -> 800c54b), gnunet, 2017/10/06
- [GNUnet-SVN] [taler-exchange] 06/06: do not potentially pass -1 to fcntl(), gnunet, 2017/10/06
- [GNUnet-SVN] [taler-exchange] 04/06: check return value from TALER_amount_get_zero, gnunet, 2017/10/06
- [GNUnet-SVN] [taler-exchange] 02/06: fix indentation, gnunet, 2017/10/06
- [GNUnet-SVN] [taler-exchange] 01/06: fix signed calls to isalpha/isdigit/isspace etc.,
gnunet <=
- [GNUnet-SVN] [taler-exchange] 03/06: check return value from TALER_JSON_hash, gnunet, 2017/10/06
- [GNUnet-SVN] [taler-exchange] 05/06: better logging if IBAN validation fails, also avoid potentially unbounded stack allocation, gnunet, 2017/10/06