diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2015-01-02 17:31:36 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2015-01-02 17:31:36 +0000 |
commit | d433784affd32a879670e66bcf330b2561342f3c (patch) | |
tree | 7e110cb938b4f1a0c7a7f5bbbfc0a682ab32c4b6 /ldns/parseutil.c | |
parent | c40c0dcc50043c1f440bca54c9d731eeec13678a (diff) |
Notes
Diffstat (limited to 'ldns/parseutil.c')
-rw-r--r-- | ldns/parseutil.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ldns/parseutil.c b/ldns/parseutil.c index 55e3a5b1ad9c..28b344ede749 100644 --- a/ldns/parseutil.c +++ b/ldns/parseutil.c @@ -288,9 +288,9 @@ sldns_parse_escape(uint8_t *ch_p, const char** str_p) { uint16_t val; - if ((*str_p)[0] && isdigit((*str_p)[0]) && - (*str_p)[1] && isdigit((*str_p)[1]) && - (*str_p)[2] && isdigit((*str_p)[2])) { + if ((*str_p)[0] && isdigit((unsigned char)(*str_p)[0]) && + (*str_p)[1] && isdigit((unsigned char)(*str_p)[1]) && + (*str_p)[2] && isdigit((unsigned char)(*str_p)[2])) { val = (uint16_t)(((*str_p)[0] - '0') * 100 + ((*str_p)[1] - '0') * 10 + @@ -303,7 +303,7 @@ sldns_parse_escape(uint8_t *ch_p, const char** str_p) *str_p += 3; return 1; - } else if ((*str_p)[0] && !isdigit((*str_p)[0])) { + } else if ((*str_p)[0] && !isdigit((unsigned char)(*str_p)[0])) { *ch_p = (uint8_t)*(*str_p)++; return 1; @@ -467,7 +467,7 @@ sldns_b32_pton_base(const char* src, size_t src_sz, uint8_t* dst, size_t dst_sz, ch = *src++; --src_sz; - } while (isspace(ch) && src_sz > 0); + } while (isspace((unsigned char)ch) && src_sz > 0); if (ch == '=' || ch == '\0') break; @@ -572,7 +572,7 @@ sldns_b32_pton_base(const char* src, size_t src_sz, uint8_t* dst, size_t dst_sz, ch = *src++; src_sz--; - } while (isspace(ch)); + } while (isspace((unsigned char)ch)); if (ch != '=') return -1; |