Commit 603e5170 authored by Pauli's avatar Pauli
Browse files

Fix ctype arguments.



Cast arguments to the various ctype functions to unsigned char to match their
documentation.

Reviewed-by: default avatarAndy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4203)

(cherry picked from commit 00dfbaad)
parent c3154d78
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ char *opt_progname(const char *argv0)
    if (n > sizeof prog - 1)
        n = sizeof prog - 1;
    for (q = prog, i = 0; i < n; i++, p++)
        *q++ = isupper(*p) ? tolower(*p) : *p;
        *q++ = tolower((unsigned char)*p);
    *q = '\0';
    return prog;
}
+1 −1
Original line number Diff line number Diff line
@@ -305,7 +305,7 @@ static int massage_filename(char *name)

    if (q != NULL) {
        for (q++; *q != '\0'; q++) {
            if (!isdigit(*q))
            if (!isdigit((unsigned char)*q))
                return 1;
        }
    }
+2 −1
Original line number Diff line number Diff line
@@ -1036,7 +1036,8 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
                   ((ch >= 'a') && (ch <= 'z')) ||
                   (ch == '-') || (ch == '.') || (ch == '='))
#else
            while (isalnum(ch) || (ch == '-') || (ch == '.') || (ch == '='))
            while (isalnum((unsigned char)ch) || (ch == '-') || (ch == '.')
                   || (ch == '='))
#endif
            {
                ch = *(++l);