From 490ac259f4dd2e59159d8b50879d33c190d3b83b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 2 Jan 2002 20:05:48 +0000 Subject: [PATCH] Fix escape bug --- libraries/libldap/filter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/libldap/filter.c b/libraries/libldap/filter.c index 960327de28..7dded23d02 100644 --- a/libraries/libldap/filter.c +++ b/libraries/libldap/filter.c @@ -183,11 +183,11 @@ ldap_pvt_find_wildcard( const char *s ) case '\\': if( s[1] == '\0' ) return NULL; + if( LDAP_HEX( s[1] ) && LDAP_HEX( s[2] ) ) { s+=2; - } - switch( s[1] ) { + } else switch( s[1] ) { default: return NULL; @@ -201,7 +201,7 @@ ldap_pvt_find_wildcard( const char *s ) } } - return s; + return (char *) s; } /* unescape filter value */ @@ -332,7 +332,7 @@ ldap_int_put_filter( BerElement *ber, char *str ) * Note: tags in a choice are always explicit */ - Debug( LDAP_DEBUG_TRACE, "put_filter \"%s\"\n", str, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "put_filter: \"%s\"\n", str, 0, 0 ); parens = 0; while ( *str ) { @@ -491,7 +491,7 @@ put_simple_filter( ber_tag_t ftype; int rc = -1; - Debug( LDAP_DEBUG_TRACE, "put_simple_filter \"%s\"\n", + Debug( LDAP_DEBUG_TRACE, "put_simple_filter: \"%s\"\n", str, 0, 0 ); str = LDAP_STRDUP( str ); -- 2.39.5