← Commit list

f03e7c1d64

Jochen Sprickerhof
Jochen Sprickerhof
2025-10-19
SUCCESS Duration: 331s

Subject

openldap: fix limit max incoming size test logic

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/openldap.c+2 -2
@@ -662,11 +662,11 @@ static CURLcode oldap_connect(struct Curl_easy *data, bool *done)
{
ber_len_t max = 256*1024;
Sockbuf *sb;
- if(ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, (void **)&sb) ||
+ if((ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb) != LDAP_OPT_SUCCESS) ||
/* Set the maximum allowed size of an incoming message, which to
OpenLDAP means that it will malloc() memory up to this size. If not
set, there is no limit and we instead risk a malloc() failure. */
- ber_sockbuf_ctrl(sb, LBER_SB_OPT_SET_MAX_INCOMING, &max)) {
+ !ber_sockbuf_ctrl(sb, LBER_SB_OPT_SET_MAX_INCOMING, &max)) {
result = CURLE_FAILED_INIT;
goto out;
}