]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1259: Incorrect use of ctype functions
authorserassio <>
Sat, 12 Mar 2005 03:11:34 +0000 (03:11 +0000)
committerserassio <>
Sat, 12 Mar 2005 03:11:34 +0000 (03:11 +0000)
Forward port of 2.5 patch.

helpers/basic_auth/MSNT/smbencrypt.c
helpers/ntlm_auth/SMB/smbval/smbencrypt.c
helpers/ntlm_auth/fakeauth/fakeauth_auth.c

index 0ab8a94123a14d16fb5ce2b94ed75a499163128d..6e9361f8a79c3903d590ae28dea6db88212e71ff 100644 (file)
@@ -194,16 +194,16 @@ strupper(char *s)
            } else if (is_kana(*s)) {
                s++;
            } else {
-               if (islower(*s))
-                   *s = toupper(*s);
+               if (islower((int)(unsigned char)*s))
+                   *s = toupper((int)(unsigned char)*s);
                s++;
            }
        } else
 #endif /* KANJI_WIN95_COMPATIBILITY */
 #endif /* UNUSED_CODE */
        {
-           if (islower(*s))
-               *s = toupper(*s);
+           if (islower((int)(unsigned char)*s))
+               *s = toupper((int)(unsigned char)*s);
            s++;
        }
     }
index 3aff3cbf1faf315fdf84a956f37ff52ac0695ea0..008b240841f36149e5f51cc6ee4d8f69b0931353 100644 (file)
@@ -199,7 +199,7 @@ strupper(char *s)
         * else
         * #endif *//* KANJI_WIN95_COMPATIBILITY */
        {
-           if (islower(*s))
+           if (islower((int)(unsigned char)*s))
                *s = toupper(*s);
            s++;
        }
index b83a7bf3b4311069be08f1f5c4cdb20d14f2dddd..b74a2b4bda76465c7abf7184efaca5637625a3be 100644 (file)
@@ -176,7 +176,7 @@ ntlmGetString(ntlmhdr * hdr, strhdr * str, int flags)
        d = buf;
 
        for (; l; l--) {
-           if (*sc == '\0' || !isprint(*sc)) {
+           if (*sc == '\0' || !isprint((int)(unsigned char)*sc)) {
                fprintf(stderr, "ntlmGetString: bad ascii: %04x\n", *sc);
                return (NULL);
            }