[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

paul.dale at oracle.com paul.dale at oracle.com
Mon Aug 21 21:44:17 UTC 2017


The branch OpenSSL_1_1_0-stable has been updated
       via  603e5170161bd71d2341c34fdcca24d191964c0d (commit)
      from  c3154d784ebaeb5b0435e21f305a2b6c0f90bd92 (commit)


- Log -----------------------------------------------------------------
commit 603e5170161bd71d2341c34fdcca24d191964c0d
Author: Pauli <paul.dale at oracle.com>
Date:   Mon Aug 21 07:36:23 2017 +1000

    Fix ctype arguments.
    
    Cast arguments to the various ctype functions to unsigned char to match their
    documentation.
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/4203)
    
    (cherry picked from commit 00dfbaad88a69ed8294d6039bf5f7d722f72bf39)

-----------------------------------------------------------------------

Summary of changes:
 apps/opt.c     | 2 +-
 apps/rehash.c  | 2 +-
 ssl/ssl_ciph.c | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/apps/opt.c b/apps/opt.c
index f72ac64..4c3a26e 100644
--- a/apps/opt.c
+++ b/apps/opt.c
@@ -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;
 }
diff --git a/apps/rehash.c b/apps/rehash.c
index 2b517be..273ad74 100644
--- a/apps/rehash.c
+++ b/apps/rehash.c
@@ -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;
         }
     }
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
index dad2ec1..da6e298 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -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);


More information about the openssl-commits mailing list