From cbc5c8494ee26907a7517a5665784d60c1dceb0a Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 2 Dec 1999 05:19:24 +0000 Subject: [PATCH] Fix off-by-one in v2ref --- servers/slapd/result.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; -- 2.39.5