]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Silence negative array index warning with toupper
authorMark Andrews <marka@isc.org>
Fri, 19 Aug 2022 01:13:59 +0000 (11:13 +1000)
committerMark Andrews <marka@isc.org>
Fri, 19 Aug 2022 02:31:04 +0000 (12:31 +1000)
Cast to (unsigned char).

(cherry picked from commit d3f790340e8590ad5da1472c99d25acbc9818496)

lib/isccfg/duration.c

index 27dddca1cc2342560be5034486443a475378971f..305047e1af13edc85662732a99ab8413474da1d3 100644 (file)
@@ -63,7 +63,7 @@ isccfg_duration_fromtext(isc_textregion_t *source,
        duration->unlimited = false;
 
        /* Every duration starts with 'P' */
-       if (toupper(str[0]) != 'P') {
+       if (toupper((unsigned char)str[0]) != 'P') {
                return (ISC_R_BADNUMBER);
        }
        P = str;