mirror of
https://github.com/curl/curl.git
synced 2026-07-26 01:47:15 +03:00
openldap: fix an LDAP crash
Reported-by: Ozan Cansel Fixes #12593 Closes #12600
This commit is contained in:
parent
68f96fc9bf
commit
fa6e123929
1 changed files with 8 additions and 4 deletions
|
|
@ -887,10 +887,14 @@ static CURLcode oldap_do(struct Curl_easy *data, bool *done)
|
|||
|
||||
result = oldap_url_parse(data, &lud);
|
||||
if(!result) {
|
||||
Sockbuf *sb;
|
||||
/* re-install the libcurl SSL handlers into the sockbuf. */
|
||||
ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb);
|
||||
ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, data);
|
||||
#ifdef USE_SSL
|
||||
if(ssl_installed(conn)) {
|
||||
Sockbuf *sb;
|
||||
/* re-install the libcurl SSL handlers into the sockbuf. */
|
||||
ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb);
|
||||
ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, data);
|
||||
}
|
||||
#endif
|
||||
|
||||
rc = ldap_search_ext(li->ld, lud->lud_dn, lud->lud_scope,
|
||||
lud->lud_filter, lud->lud_attrs, 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue