]> git.sur5r.net Git - openldap/commitdiff
ITS#6233 don't advance ptr after storing final NUL.
authorHoward Chu <hyc@openldap.org>
Tue, 28 Jul 2009 22:04:13 +0000 (22:04 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 28 Jul 2009 22:04:13 +0000 (22:04 +0000)
clients/tools/common.c

index 5185a699dace9d778478c25c3b3e1d813030a078..8ac059fcbd47bc57ee2e572a0acfcc49ece5afd7 100644 (file)
@@ -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);