]> git.sur5r.net Git - openldap/commitdiff
Fix off-by-one in v2ref
authorHoward Chu <hyc@openldap.org>
Thu, 2 Dec 1999 05:19:24 +0000 (05:19 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 2 Dec 1999 05:19:24 +0000 (05:19 +0000)
servers/slapd/result.c

index 510102a7c02f26fedf5e7fa9357fdb41f983353d..37faa5181ec71d941b3c11f99f28d5476276b3f8 100644 (file)
@@ -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';