From 82874bed6ef1c1d6ff7e3ae05fb4786a35fc58fa Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 28 Jul 2009 22:04:13 +0000 Subject: [PATCH] ITS#6233 don't advance ptr after storing final NUL. --- clients/tools/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/tools/common.c b/clients/tools/common.c index 5185a699da..8ac059fcbd 100644 --- a/clients/tools/common.c +++ b/clients/tools/common.c @@ -2073,7 +2073,7 @@ print_deref( LDAP *ld, LDAPControl *ctrl ) } ptr = lutil_strncopy( ptr, dr->derefVal.bv_val, dr->derefVal.bv_len ); *ptr++ = '\n'; - *ptr++ = '\0'; + *ptr = '\0'; assert( ptr <= buf + len ); tool_write_ldif( LDIF_PUT_COMMENT, NULL, buf, ptr - buf); -- 2.39.5