From: Hallvard Furuseth Date: Tue, 2 Aug 2005 08:43:27 +0000 (+0000) Subject: Fix off-by-one pointer error. Garbage byte between uuid and csn in slog_entry. X-Git-Tag: OPENLDAP_AC_BP~107 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a3f3143cc5a1b42e12003ec11dabf80fcf6aac38;p=openldap Fix off-by-one pointer error. Garbage byte between uuid and csn in slog_entry. --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 5a075cd1ad..b57a5a46be 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -1180,10 +1180,10 @@ syncprov_add_slog( Operation *op, struct berval *csn ) se->se_tag = op->o_tag; se->se_uuid.bv_val = (char *)(se+1); - se->se_csn.bv_val = se->se_uuid.bv_val + opc->suuid.bv_len + 1; AC_MEMCPY( se->se_uuid.bv_val, opc->suuid.bv_val, opc->suuid.bv_len ); se->se_uuid.bv_len = opc->suuid.bv_len; + se->se_csn.bv_val = se->se_uuid.bv_val + opc->suuid.bv_len; AC_MEMCPY( se->se_csn.bv_val, csn->bv_val, csn->bv_len ); se->se_csn.bv_val[csn->bv_len] = '\0'; se->se_csn.bv_len = csn->bv_len;