From: Ryan Tandy Date: Thu, 22 Aug 2024 00:48:45 +0000 (-0700) Subject: ITS#10253 Fix incompatible pointer type with GnuTLS X-Git-Tag: OPENLDAP_REL_ENG_2_5_19~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a6a2ac4ff8e95c27dc4279b84c671ad9e829a3b;p=thirdparty%2Fopenldap.git ITS#10253 Fix incompatible pointer type with GnuTLS --- diff --git a/libraries/libldap/tls_g.c b/libraries/libldap/tls_g.c index 0719bc328a..c2b0fd83d1 100644 --- a/libraries/libldap/tls_g.c +++ b/libraries/libldap/tls_g.c @@ -945,12 +945,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;