From: Howard Chu Date: Sun, 6 Apr 2003 00:52:24 +0000 (+0000) Subject: ITS#2423 don't malloc prompt results X-Git-Tag: AUTOCONF_2_57~54 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a14acc68e2fc937ad1d08c8eeff3fc214809d561;p=openldap ITS#2423 don't malloc prompt results --- diff --git a/contrib/ldapsasl/ldapdb.c b/contrib/ldapsasl/ldapdb.c index 2cf430291f..a373127b07 100644 --- a/contrib/ldapsasl/ldapdb.c +++ b/contrib/ldapsasl/ldapdb.c @@ -70,10 +70,7 @@ static int ldapdb_interact(LDAP *ld, unsigned flags __attribute__((unused)), } if (p.bv_val) { - in->result = gc->lp->utils->malloc(p.bv_len+1); - if (!in->result) - return LDAP_NO_MEMORY; - strcpy((char *)in->result, p.bv_val); + in->result = p.bv_val; in->len = p.bv_len; } }