]> git.sur5r.net Git - openldap/commitdiff
ITS#7138 smbk5pwd: fix ITS#6955 shadowLastChange
authorSATOH Fumiyasu <fumiyas@osstech.co.jp>
Fri, 27 Jan 2012 17:13:40 +0000 (02:13 +0900)
committerHoward Chu <hyc@openldap.org>
Fri, 27 Jan 2012 21:08:36 +0000 (13:08 -0800)
Fix uninitialized keys[1] in shadowLastChange support

contrib/slapd-modules/smbk5pwd/smbk5pwd.c

index fd38384a348eff10c72c35050959d335a1e51009..d4d7f6fe3331e3b1c405c6f6fde001c2b830cb6e 100644 (file)
@@ -680,6 +680,7 @@ static int smbk5pwd_exop_passwd(
                qpw->rs_mods = ml;
 
                keys = ch_malloc( sizeof(struct berval) * 2);
+               BER_BVZERO( &keys[1] );
                keys[0].bv_val = ch_malloc( LDAP_PVT_INTTYPE_CHARS(long) );
                keys[0].bv_len = snprintf(keys[0].bv_val,
                        LDAP_PVT_INTTYPE_CHARS(long),