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/x509v3 | |
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/x509v3')
-rw-r--r-- | crypto/x509v3/v3_conf.c | 4 | ||||
-rw-r--r-- | crypto/x509v3/v3_utl.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crypto/x509v3/v3_conf.c b/crypto/x509v3/v3_conf.c index 0460fbedfc..91cc7ebfaa 100644 --- a/crypto/x509v3/v3_conf.c +++ b/crypto/x509v3/v3_conf.c @@ -203,7 +203,7 @@ static int v3_check_critical(char **value) char *p = *value; if((strlen(p) < 9) || strncmp(p, "critical,", 9)) return 0; p+=9; - while(isspace(*p)) p++; + while(isspace((unsigned char)*p)) p++; *value = p; return 1; } @@ -214,7 +214,7 @@ static int v3_check_generic(char **value) char *p = *value; if((strlen(p) < 4) || strncmp(p, "RAW:,", 4)) return 0; p+=4; - while(isspace(*p)) p++; + while(isspace((unsigned char)*p)) p++; *value = p; return 1; } diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c index c1ea05c1e9..7ffab1383c 100644 --- a/crypto/x509v3/v3_utl.c +++ b/crypto/x509v3/v3_utl.c @@ -311,10 +311,10 @@ static char *strip_spaces(char *name) char *p, *q; /* Skip over leading spaces */ p = name; - while(*p && isspace(*p)) p++; + while(*p && isspace((unsigned char)*p)) p++; if(!*p) return NULL; q = p + strlen(p) - 1; - while((q != p) && isspace(*q)) q--; + while((q != p) && isspace((unsigned char)*q)) q--; if(p != q) q[1] = 0; if(!*p) return NULL; return p; |