From 6f9fb7ec2d7cb389a0da5a1d0617ce592115a6a8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 5 Sep 2022 23:21:15 +0200 Subject: misc: ISSPACE() => ISBLANK() Instances of ISSPACE() use that should rather use ISBLANK(). I think somewhat carelessly used because it sounds as if it checks for space or whitespace, but also includes %0a to %0d. For parsing purposes, we should only accept what we must and not be overly liberal. It leads to surprises and surprises lead to bad things. Closes #9432 --- lib/openldap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/openldap.c') diff --git a/lib/openldap.c b/lib/openldap.c index 19f2ad9f0..3a93b6728 100644 --- a/lib/openldap.c +++ b/lib/openldap.c @@ -1068,8 +1068,8 @@ static ssize_t oldap_recv(struct Curl_easy *data, int sockindex, char *buf, if(!binary) { /* check for leading or trailing whitespace */ - if(ISSPACE(bvals[i].bv_val[0]) || - ISSPACE(bvals[i].bv_val[bvals[i].bv_len - 1])) + if(ISBLANK(bvals[i].bv_val[0]) || + ISBLANK(bvals[i].bv_val[bvals[i].bv_len - 1])) binval = 1; else { /* check for unprintable characters */ -- cgit v1.2.1