← Commit list

232d5a2ed9

Daniel Stenberg
Daniel Stenberg
2025-09-18
FAILED Duration: 178s

Subject

openldap: avoid indexing the result at -1 for blank responses

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 -1
@@ -1172,7 +1172,8 @@ static CURLcode oldap_recv(struct Curl_easy *data, int sockindex, char *buf,
if(!binary) {
/* check for leading or trailing whitespace */
if(ISBLANK(bvals[i].bv_val[0]) ||
- ISBLANK(bvals[i].bv_val[bvals[i].bv_len - 1]))
+ (bvals[i].bv_len &&
+ ISBLANK(bvals[i].bv_val[bvals[i].bv_len - 1])))
binval = TRUE;
else {
/* check for unprintable characters */