From: Pierangelo Masarati Date: Sat, 4 Aug 2001 15:46:08 +0000 (+0000) Subject: fix a reference to volative memory in back-ldbm/passwd.c that caused garbage messages... X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1163 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8ee616891600003e859b2dba3efa27a2ebcec4d0;p=openldap fix a reference to volative memory in back-ldbm/passwd.c that caused garbage messages to be returned to ldappasswd --- 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";