From 8ee616891600003e859b2dba3efa27a2ebcec4d0 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 4 Aug 2001 15:46:08 +0000 Subject: [PATCH] fix a reference to volative memory in back-ldbm/passwd.c that caused garbage messages to be returned to ldappasswd --- servers/slapd/back-ldbm/passwd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/servers/slapd/back-ldbm/passwd.c b/servers/slapd/back-ldbm/passwd.c index c4f81e7c80..41b3046459 100644 --- a/servers/slapd/back-ldbm/passwd.c +++ b/servers/slapd/back-ldbm/passwd.c @@ -144,6 +144,12 @@ ldbm_back_exop_passwd( rc = ldbm_modify_internal( be, conn, op, op->o_ndn, &ml, e, text, textbuf, textlen ); + /* FIXME: ldbm_modify_internal may set *tex = textbuf, + * which is BAD */ + if ( *text == textbuf ) { + *text = NULL; + } + if( rc ) { /* cannot return textbuf */ *text = "entry modify failed";