]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9668 ldap_int_tls_connect: isdigit() requires unsigned char
authorHoward Chu <hyc@openldap.org>
Mon, 6 Sep 2021 20:14:21 +0000 (21:14 +0100)
committerHoward Chu <hyc@openldap.org>
Mon, 6 Sep 2021 20:14:21 +0000 (21:14 +0100)
libraries/libldap/tls2.c

index a3a8399bf598921b7ba937b6747e3a3962fe1389..1fb6cff66cfff21052d8b0d6d88d895b061ba6c9 100644 (file)
@@ -350,7 +350,7 @@ ldap_int_tls_connect( LDAP *ld, LDAPConn *conn, const char *host )
        Sockbuf *sb = conn->lconn_sb;
        int     err;
        tls_session     *ssl = NULL;
-       char *sni = (char *)host;
+       const char *sni = host;
 
        if ( HAS_TLS( sb )) {
                ber_sockbuf_ctrl( sb, LBER_SB_OPT_GET_SSL, (void *)&ssl );
@@ -390,8 +390,8 @@ ldap_int_tls_connect( LDAP *ld, LDAPConn *conn, const char *host )
         */
        {
                int numeric = 1;
-               char *c;
-               for ( c = sni; *c; c++ ) {
+               unsigned char *c;
+               for ( c = (unsigned char *)sni; *c; c++ ) {
                        if ( *c == ':' )        /* IPv6 address */
                                break;
                        if ( *c == '.' )