ITS#10493 liblber: tweak commit from ITS#10438

Always NUL-terminate dst->bv_val.
This commit is contained in:
Dirk 2026-04-17 22:34:10 +00:00 committed by Quanah Gibson-Mount
parent a8b4c6572f
commit 1e42634c00

View file

@ -719,7 +719,8 @@ ber_bvreplace_x( struct berval *dst, LDAP_CONST struct berval *src, void *ctx )
}
if ( dst->bv_val != NULL ) {
AC_MEMCPY( dst->bv_val, src->bv_val, dst->bv_len + 1 );
AC_MEMCPY( dst->bv_val, src->bv_val, dst->bv_len );
dst->bv_val[dst->bv_len] = '\0';
}
return dst;