From: Kurt Zeilenga Date: Fri, 9 Jun 2000 01:44:48 +0000 (+0000) Subject: Fix back-shell realloc bug (reverting version to 1.2.11re) X-Git-Tag: OPENLDAP_REL_ENG_1_2_11~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd1f1b31e886d7e356c5b73813be99ab2c824d4f;p=thirdparty%2Fopenldap.git Fix back-shell realloc bug (reverting version to 1.2.11re) --- diff --git a/CHANGES b/CHANGES index af1ef9a309..29ad95ddbe 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,5 @@ OpenLDAP Change Log -Changes included in OpenLDAP 1.2.12 Release Engineering - CVS Tag: OPENLDAP_REL_ENG_1_2_12 - - Changes included in OpenLDAP 1.2.11 CVS Tag: OPENLDAP_REL_ENG_1_2_11 Fixed /tmp races in ud, ldapsearch, ldbmtest and slurpd @@ -16,6 +12,7 @@ Changes included in OpenLDAP 1.2.11 Fixed ACL groups member matching Raise MAXDBCACHE to 128 (ITS#512) Fixed slapd client_addr crash (ITS#579) + Fixed back-shell realloc bug (ITS#506) Build Environment Update res_search detection Detect and use getpassphrase() and getpass() diff --git a/build/version b/build/version index 756eb78e28..3d4eab0efd 100644 --- a/build/version +++ b/build/version @@ -1 +1 @@ -1.2.12-Engineering +1.2.11-Engineering diff --git a/servers/slapd/back-shell/result.c b/servers/slapd/back-shell/result.c index daa826775d..080f92860f 100644 --- a/servers/slapd/back-shell/result.c +++ b/servers/slapd/back-shell/result.c @@ -42,8 +42,10 @@ read_and_send_results( } len = strlen( line ); while ( bp + len - buf > bsize ) { + size_t offset = bp - buf; bsize += BUFSIZ; buf = (char *) ch_realloc( buf, bsize ); + bp = &buf[offset]; } strcpy( bp, line ); bp += len;