From 3d39ff68a94e4455074707d763138f01aaa1c5b1 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Sat, 9 Feb 2008 02:18:40 +0000 Subject: [PATCH] ITS#5300 --- CHANGES | 1 + libraries/libldap/filter.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 25aa47761d..f2b98d85b7 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ OpenLDAP 2.4 Change Log OpenLDAP 2.4.8 Engineering Fixed ldapmodify verbose logging (ITS#5247) + Fixed libldap filter abort (ITS#5300) Fixed libldap ldap_parse_sasl_bind_result (ITS#5263) Fixed libldap search timeout crash (ITS#5291) Fixed ldapdelete with sizelimit (ITS#5294) diff --git a/libraries/libldap/filter.c b/libraries/libldap/filter.c index 6709540885..3ad77c4fdb 100644 --- a/libraries/libldap/filter.c +++ b/libraries/libldap/filter.c @@ -751,10 +751,12 @@ put_substring_filter( BerElement *ber, char *type, char *val ) } } - if ( *val != '\0' || ftype == LDAP_SUBSTRING_ANY ) { + if ( *val == '\0' ) { + return -1; + } else { ber_slen_t len = ldap_pvt_filter_value_unescape( val ); - if ( len < 0 ) { + if ( len <= 0 ) { return -1; } -- 2.39.5