summaryrefslogtreecommitdiff
path: root/ldns/parseutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldns/parseutil.c')
-rw-r--r--ldns/parseutil.c12
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;