From a14acc68e2fc937ad1d08c8eeff3fc214809d561 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 6 Apr 2003 00:52:24 +0000 Subject: [PATCH] ITS#2423 don't malloc prompt results --- contrib/ldapsasl/ldapdb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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; } }