]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix argument range of ctype functions.
authorJoerg Sonnenberger <joerg@bec.de>
Tue, 21 Jun 2016 12:34:02 +0000 (14:34 +0200)
committerJoerg Sonnenberger <joerg@bec.de>
Tue, 21 Jun 2016 12:34:02 +0000 (14:34 +0200)
libarchive_fe/passphrase.c

index 1eae0b888bcd3d78799bffbccc04bd2348e5477a..d5ecccc5a68eee079bf92af920a0a1d271188ab0 100644 (file)
@@ -237,11 +237,11 @@ restart:
                        if (p < end) {
                                if ((flags & RPP_SEVENBIT))
                                        ch &= 0x7f;
-                               if (isalpha(ch)) {
+                               if (isalpha((unsigned char)ch)) {
                                        if ((flags & RPP_FORCELOWER))
-                                               ch = (char)tolower(ch);
+                                               ch = (char)tolower((unsigned char)ch);
                                        if ((flags & RPP_FORCEUPPER))
-                                               ch = (char)toupper(ch);
+                                               ch = (char)toupper((unsigned char)ch);
                                }
                                *p++ = ch;
                        }