From 254b62b8037118d78c8f8901b9ca4504e1a5f0f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Thu, 23 Jan 2020 12:30:50 +0000 Subject: [PATCH] ITS#9126 Add a missed normalised copy of pwdChangedTime --- servers/slapd/overlays/ppolicy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 37dc6df745..8653e9ce1e 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -2114,10 +2114,11 @@ do_modify: mods = (Modifications *) ch_calloc( sizeof( Modifications ), 1 ); mods->sml_op = LDAP_MOD_REPLACE; mods->sml_numvals = 1; - mods->sml_values = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) ); + mods->sml_values = (BerVarray) ch_calloc( sizeof( struct berval ), 2 ); + mods->sml_nvalues = (BerVarray) ch_calloc( sizeof( struct berval ), 2 ); + ber_dupbv( &mods->sml_values[0], ×tamp ); - BER_BVZERO( &mods->sml_values[1] ); - assert( !BER_BVISNULL( &mods->sml_values[0] ) ); + ber_dupbv( &mods->sml_nvalues[0], ×tamp ); } else if (attr_find(e->e_attrs, ad_pwdChangedTime )) { mods = (Modifications *) ch_calloc( sizeof( Modifications ), 1 ); mods->sml_op = LDAP_MOD_DELETE;