]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix "array subscript is of type 'char'"
authorMichal Nowak <mnowak@isc.org>
Tue, 2 Jun 2020 18:32:21 +0000 (20:32 +0200)
committerMichal Nowak <mnowak@isc.org>
Thu, 4 Jun 2020 12:33:06 +0000 (14:33 +0200)
bin/named/main.c
lib/isccfg/parser.c

index b03b30c07211e23249f90cae2b37b8f02c5a1deb..1c36b2edf88ce5b118af51393efd27771d68611a 100644 (file)
@@ -347,11 +347,12 @@ save_command_line(int argc, char *argv[]) {
                *dst++ = ' ';
 
                while (*src != '\0' && dst < eob) {
-                       if (isalnum(*src) || *src == ',' || *src == '-' ||
-                           *src == '_' || *src == '.' || *src == '/')
+                       if (isalnum(*(unsigned char *)src) || *src == ',' ||
+                           *src == '-' || *src == '_' || *src == '.' ||
+                           *src == '/')
                        {
                                *dst++ = *src++;
-                       } else if (isprint(*src)) {
+                       } else if (isprint(*(unsigned char *)src)) {
                                if (dst + 2 >= eob) {
                                        goto add_ellipsis;
                                }
index 73ade898a09bfc96910cc39d9bbed12e36b50264..10290d825eec0ed8bf620ec755dfbf37aa8b37a1 100644 (file)
@@ -1287,7 +1287,7 @@ parse_duration(cfg_parser_t *pctx, cfg_obj_t **ret) {
 
        duration.unlimited = false;
 
-       if (toupper(TOKEN_STRING(pctx)[0]) == 'P') {
+       if (toupper((unsigned char)TOKEN_STRING(pctx)[0]) == 'P') {
                result = duration_fromtext(&pctx->token.value.as_textregion,
                                           &duration);
                duration.iso8601 = true;