Hans Leidekker : ldap: Return an error when the server doesn't respond to the SSL handshake.
Module: wine Branch: master Commit: 9af7faca7cadc706dcb4d0842e909f8f272dbccd URL: https://gitlab.winehq.org/wine/wine/-/commit/9af7faca7cadc706dcb4d0842e909f8... Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Mar 24 10:20:16 2023 +0100 ldap: Return an error when the server doesn't respond to the SSL handshake. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54724 --- libs/ldap/libldap/tls_w.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/ldap/libldap/tls_w.c b/libs/ldap/libldap/tls_w.c index 137fb58a27a..bc64b9f62e5 100644 --- a/libs/ldap/libldap/tls_w.c +++ b/libs/ldap/libldap/tls_w.c @@ -221,8 +221,8 @@ tlsw_session_connect( LDAP *ld, tls_session *session, const char *name_in ) while ( expected > 0 ) { size = tlsw_recv( s->sbiod, (char *)in_bufs[0].pvBuffer + recv_offset, expected ); - if ( size < 0 ) - break; + if ( size <= 0 ) + goto done; in_bufs[0].cbBuffer += size; recv_offset += size; expected -= size; @@ -239,6 +239,7 @@ tlsw_session_connect( LDAP *ld, tls_session *session, const char *name_in ) } } +done: ber_memfree( in_bufs[0].pvBuffer ); FreeContextBuffer( out_bufs[0].pvBuffer ); return status == SEC_E_OK ? 0 : -1; @@ -247,7 +248,7 @@ tlsw_session_connect( LDAP *ld, tls_session *session, const char *name_in ) static int tlsw_session_upflags( Sockbuf *sb, tls_session *session, int rc ) { - return -1; + return 0; } static char *
participants (1)
-
Alexandre Julliard