mirror of
https://github.com/curl/curl.git
synced 2026-04-14 21:41:41 +03:00
openldap: avoid indexing the result at -1 for blank responses
Reported-by: Joshua Rogers Closes #18600
This commit is contained in:
parent
5cc2b83446
commit
232d5a2ed9
1 changed files with 2 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue