diff options
author | Bodo Möller <bodo@openssl.org> | 1999-05-10 11:18:26 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 1999-05-10 11:18:26 +0000 |
commit | 84a370a4002740d8311e5c6950071dfff436395b (patch) | |
tree | 620d65dcdcda536fd49f0e38fb856de4aeea60d8 /crypto/bn | |
parent | 93c5624f04a4a371bdbd66af264743f0bad8c516 (diff) |
The various character predicates (isspace and the like) may not be
used with negative char values, so I've added casts to unsigned char.
Maybe what really should be done is change all those arrays and
pointers to type unsigned char [] or unsigned char *, respectively;
but using plain char with those predicates is just wrong, so something
had to be done.
Submitted by:
Reviewed by:
PR:
Diffstat (limited to 'crypto/bn')
-rw-r--r-- | crypto/bn/bn_print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c index 1ec49ed3cc..f2d2fce589 100644 --- a/crypto/bn/bn_print.c +++ b/crypto/bn/bn_print.c @@ -165,7 +165,7 @@ int BN_hex2bn(BIGNUM **bn, char *a) if (*a == '-') { neg=1; a++; } - for (i=0; isxdigit(a[i]); i++) + for (i=0; isxdigit((unsigned char) a[i]); i++) ; num=i+neg; @@ -230,7 +230,7 @@ int BN_dec2bn(BIGNUM **bn, char *a) if ((a == NULL) || (*a == '\0')) return(0); if (*a == '-') { neg=1; a++; } - for (i=0; isdigit(a[i]); i++) + for (i=0; isdigit((unsigned char) a[i]); i++) ; num=i+neg; |