mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-05-28 04:35:57 -04:00
ITS#10493 liblber: tweak commit from ITS#10438
Always NUL-terminate dst->bv_val.
This commit is contained in:
parent
a8b4c6572f
commit
1e42634c00
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue