From: Luke Howard Date: Fri, 24 Jan 2003 11:09:20 +0000 (+0000) Subject: Fix memory smasher in slapi_x_modifications2ldapmods() X-Git-Tag: NO_SLAP_OP_BLOCKS~503 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=24e14748aaf1804d9ad9a982e1c75c18ad8278ea;p=openldap Fix memory smasher in slapi_x_modifications2ldapmods() --- diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index 73e34e29be..9cfe1ec9a5 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -2492,6 +2492,7 @@ LDAPMod **slapi_x_modifications2ldapmods(Modifications **pmodlist) mods = (LDAPMod **)ch_malloc( (i + 1) * sizeof(LDAPMod *) ); for( i = 0, ml = modlist; ml != NULL; ml = ml->sml_next ) { + mods[i] = (LDAPMod *)ch_malloc( sizeof(LDAPMod) ); modp = mods[i]; modp->mod_op = ml->sml_op | LDAP_MOD_BVALUES;