From: Ryan Tandy Date: Thu, 22 Aug 2024 00:48:45 +0000 (-0700) Subject: ITS#10253 Fix incompatible pointer type X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa7b1a3db94905cc56f08f1e3c791cc68377698e;p=thirdparty%2Fopenldap.git ITS#10253 Fix incompatible pointer type --- diff --git a/libraries/libldap/tls_g.c b/libraries/libldap/tls_g.c index 7c238750b3..de5b7f7c84 100644 --- a/libraries/libldap/tls_g.c +++ b/libraries/libldap/tls_g.c @@ -965,12 +965,13 @@ tlsg_session_pinning( LDAP *ld, tls_session *sess, char *hashalg, struct berval } if ( hashalg ) { - keyhash.bv_len = gnutls_hash_get_len( alg ); - keyhash.bv_val = LDAP_MALLOC( keyhash.bv_len ); + len = gnutls_hash_get_len( alg ); + keyhash.bv_val = LDAP_MALLOC( len ); if ( !keyhash.bv_val || gnutls_fingerprint( alg, &key, - keyhash.bv_val, &keyhash.bv_len ) < 0 ) { + keyhash.bv_val, &len ) < 0 ) { goto done; } + keyhash.bv_len = len; } else { keyhash.bv_val = (char *)key.data; keyhash.bv_len = key.size;