Skip to content

Commit

Permalink
openldap: set the callback argument in oldap_do
Browse files Browse the repository at this point in the history
... to make sure it has the current 'data' pointer and not a stale old
one.

Reported-by: Dan Fandrich
Closes #12166
  • Loading branch information
bagder committed Oct 21, 2023
1 parent 9cf4759 commit 3afbe06
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/openldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,11 @@ 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);

rc = ldap_search_ext(li->ld, lud->lud_dn, lud->lud_scope,
lud->lud_filter, lud->lud_attrs, 0,
NULL, NULL, NULL, 0, &msgid);
Expand Down

0 comments on commit 3afbe06

Please sign in to comment.