]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10251 cast sa when passed to getsockname
authorOndřej Kuzník <ondra@mistotebe.net>
Tue, 13 Aug 2024 08:21:15 +0000 (09:21 +0100)
committerOndřej Kuzník <ondra@mistotebe.net>
Tue, 13 Aug 2024 08:21:15 +0000 (09:21 +0100)
clients/tools/common.c

index c8fe6f6f287973500ec6f9b598b02c33e0379892..362ea78fc61db6d52ac0d1fe3668234ecd9f6c4c 100644 (file)
@@ -231,7 +231,7 @@ st_value( LDAP *ld, struct berval *value )
                if ( ldap_get_option( ld, LDAP_OPT_DESC, &sd ) == LDAP_SUCCESS ) {
                        struct sockaddr_storage sa;
                        socklen_t sl = sizeof(sa);
-                       if ( getsockname( sd, &sa, &sl ) == 0 ) {
+                       if ( getsockname( sd, (struct sockaddr *)&sa, &sl ) == 0 ) {
                                if ( sa.ss_family == AF_INET ) {
                                        struct sockaddr_in *sai = (struct sockaddr_in *)&sa;
                                        ip = inet_ntoa( sai->sin_addr );