From 84a370a4002740d8311e5c6950071dfff436395b Mon Sep 17 00:00:00 2001 From: Bodo Möller Date: Mon, 10 May 1999 11:18:26 +0000 Subject: 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: --- crypto/bn/bn_print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/bn/bn_print.c') 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; -- cgit v1.2.3