From: Mark Andrews Date: Mon, 2 Apr 2001 09:42:20 +0000 (+0000) Subject: char array index X-Git-Tag: v9.1.2rc1~35^2~27 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=9de63e99af54468cd90129c0e4d6818b7babbd48;p=thirdparty%2Fbind9.git char array index --- diff --git a/lib/bind/dst/dst_api.c b/lib/bind/dst/dst_api.c index 954f8c5f76d..3624988dd80 100644 --- a/lib/bind/dst/dst_api.c +++ b/lib/bind/dst/dst_api.c @@ -1,5 +1,5 @@ #ifndef LINT -static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/dst_api.c,v 1.1 2001/03/29 06:31:31 marka Exp $"; +static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/dst_api.c,v 1.2 2001/04/02 09:42:20 marka Exp $"; #endif /* @@ -557,7 +557,7 @@ dst_s_read_public_key(const char *in_name, const u_int16_t in_id, int in_alg) enckey[--len] = '\0'; /* remove leading spaces */ - for (notspace = (char *) enckey; isspace(*notspace); len--) + for (notspace = (char *) enckey; isspace((*notspace)&0xff); len--) notspace++; dlen = b64_pton(notspace, deckey, sizeof(deckey)); diff --git a/lib/bind/nameser/ns_date.c b/lib/bind/nameser/ns_date.c index 486f70abda9..69b1717380c 100644 --- a/lib/bind/nameser/ns_date.c +++ b/lib/bind/nameser/ns_date.c @@ -16,7 +16,7 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_date.c,v 1.1 2001/03/29 06:31:56 marka Exp $"; +static const char rcsid[] = "$Id: ns_date.c,v 1.2 2001/04/02 09:41:33 marka Exp $"; #endif /* Import. */ @@ -116,7 +116,7 @@ datepart(const char *buf, int size, int min, int max, int *errp) { int i; for (i = 0; i < size; i++) { - if (!isdigit(buf[i])) + if (!isdigit(buf[i]&0xff)) *errp = 1; result = (result * 10) + buf[i] - '0'; } diff --git a/lib/bind/nameser/ns_name.c b/lib/bind/nameser/ns_name.c index 1bed101870e..1ff1d9d59cc 100644 --- a/lib/bind/nameser/ns_name.c +++ b/lib/bind/nameser/ns_name.c @@ -16,7 +16,7 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_name.c,v 1.1 2001/03/29 06:31:56 marka Exp $"; +static const char rcsid[] = "$Id: ns_name.c,v 1.2 2001/04/02 09:40:56 marka Exp $"; #endif #include "port_before.h" @@ -848,7 +848,7 @@ encode_bitsring(const char **bp, const char *end, char **labelp, break; default: if (afterslash) { - if (!isdigit(c)) + if (!isdigit(c&0xff)) return(EINVAL); if (beg_blen == NULL) { @@ -859,7 +859,7 @@ encode_bitsring(const char **bp, const char *end, char **labelp, beg_blen = cp; } } else { - if (!isxdigit(c)) + if (!isxdigit(c&0xff)) return(EINVAL); value <<= 4; value += digitvalue[(int)c];