From: Kurt Zeilenga Date: Wed, 3 May 2000 10:51:57 +0000 (+0000) Subject: Setting UFN prefix to NULL should clear prefix, not cause crash X-Git-Tag: OPENLDAP_REL_ENG_1_2_11~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d06783128edf9097567b3e487bdbb79ed06d306;p=thirdparty%2Fopenldap.git Setting UFN prefix to NULL should clear prefix, not cause crash --- diff --git a/CHANGES b/CHANGES index ea402faedb..dffd629777 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,7 @@ Changes included in OpenLDAP 1.2.11 Release Engineering Fix slurpd to properly restart in oneshot mode, and to report a non-zero number of items to process with only one replica. Fix strdup use in libldap/request.c + Fix NULL prefix bug in libldap/ufn.c Changes included in OpenLDAP 1.2.10 CVS Tag: OPENLDAP_REL_ENG_1_2_10 diff --git a/libraries/libldap/ufn.c b/libraries/libldap/ufn.c index b269bd0344..d3bfc63839 100644 --- a/libraries/libldap/ufn.c +++ b/libraries/libldap/ufn.c @@ -476,7 +476,8 @@ ldap_ufn_setprefix( LDAP *ld, char *prefix ) if ( ld->ld_ufnprefix != NULL ) free( ld->ld_ufnprefix ); - ld->ld_ufnprefix = ldap_strdup( prefix ); + ld->ld_ufnprefix = prefix == NULL + ? NULL : ldap_strdup( prefix ); } int