]> git.sur5r.net Git - openldap/commitdiff
slap_mods2entry(,,,dup=1,,,) realloced insufficient space for attr->a_nvals
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 1 Aug 2005 03:56:36 +0000 (03:56 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 1 Aug 2005 03:56:36 +0000 (03:56 +0000)
servers/slapd/add.c

index 1c23986c611d639fa36bdbbebfdb42936c840650..a2f4e242ac9392735edf7781723e719cefdc8c3e 100644 (file)
@@ -447,7 +447,8 @@ slap_mods2entry(
                                for ( j = 0; mods->sml_values[j].bv_val; j++ ) {
                                        ber_dupbv( &attr->a_vals[i+j], &mods->sml_values[j] );
                                }
-                               BER_BVZERO( &attr->a_vals[i+j] );       
+                               BER_BVZERO( &attr->a_vals[i+j] );
+                               j++;
                        } else {
                                AC_MEMCPY( &attr->a_vals[i], mods->sml_values,
                                        sizeof( struct berval ) * j );