From: Howard Chu Date: Thu, 2 Dec 1999 05:19:24 +0000 (+0000) Subject: Fix off-by-one in v2ref X-Git-Tag: UCDATA_2_4~151 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cbc5c8494ee26907a7517a5665784d60c1dceb0a;p=openldap Fix off-by-one in v2ref --- diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 510102a7c0..37faa5181e 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -49,7 +49,7 @@ static char *v2ref( struct berval **ref, const char *text ) v2 = ch_realloc( v2, len + ref[i]->bv_len + 1 ); v2[len-1] = '\n'; memcpy(&v2[len], ref[i]->bv_val, ref[i]->bv_len ); - len += ref[i]->bv_len; + len += ref[i]->bv_len + 1; } v2[len-1] = '\0';