ITS#5511 make room for filter's terminating NUL character

This commit is contained in:
Howard Chu 2008-05-23 15:40:15 +00:00
parent 9d787d8d42
commit cd7227b4c6

View File

@ -1058,6 +1058,9 @@ unique_add(
/* skip this domain-uri if it isn't involved */
if ( !ks ) continue;
/* terminating NUL */
ks++;
if ( uri->filter.bv_val && uri->filter.bv_len )
ks += uri->filter.bv_len + STRLENOF ("(&)");
kp = key = op->o_tmpalloc(ks, op->o_tmpmemctx);
@ -1166,6 +1169,9 @@ unique_modify(
/* skip this domain-uri if it isn't involved */
if ( !ks ) continue;
/* terminating NUL */
ks++;
if ( uri->filter.bv_val && uri->filter.bv_len )
ks += uri->filter.bv_len + STRLENOF ("(&)");
kp = key = op->o_tmpalloc(ks, op->o_tmpmemctx);
@ -1299,6 +1305,9 @@ unique_modrdn(
/* skip this domain if it isn't involved */
if ( !ks ) continue;
/* terminating NUL */
ks++;
if ( uri->filter.bv_val && uri->filter.bv_len )
ks += uri->filter.bv_len + STRLENOF ("(&)");
kp = key = op->o_tmpalloc(ks, op->o_tmpmemctx);