2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

ensure proper range for argument to ctype functions

This commit is contained in:
David Lawrence
2000-05-09 22:22:25 +00:00
parent f855bad4a1
commit 47b26abe77
16 changed files with 535 additions and 521 deletions

View File

@@ -489,7 +489,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
tokenp->type = isc_tokentype_special;
tokenp->value.as_char = c;
done = ISC_TRUE;
} else if (isdigit(c) &&
} else if (isdigit((unsigned char)c) &&
(options & ISC_LEXOPT_NUMBER) != 0) {
lex->last_was_eol = ISC_FALSE;
state = lexstate_number;
@@ -508,7 +508,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
lex->last_was_eol = ISC_TRUE;
break;
case lexstate_number:
if (!isdigit(c)) {
if (c == EOF || !isdigit((unsigned char)c)) {
if (c == ' ' || c == '\t' || c == '\r' ||
c == '\n' || c == EOF ||
lex->specials[c]) {