From 1d06783128edf9097567b3e487bdbb79ed06d306 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 3 May 2000 10:51:57 +0000 Subject: [PATCH] Setting UFN prefix to NULL should clear prefix, not cause crash --- CHANGES | 1 + libraries/libldap/ufn.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.5