From 66704f67b92035a7e49810fca450e4bb9e9db37c Mon Sep 17 00:00:00 2001
From: Hallvard Furuseth <hallvard@openldap.org>
Date: Sat, 28 Aug 1999 22:15:16 +0000
Subject: [PATCH] Catch \ at end of filter

---
 libraries/libldap/search.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c
index 50c46cfa20..bb9f1c28f8 100644
--- a/libraries/libldap/search.c
+++ b/libraries/libldap/search.c
@@ -426,6 +426,8 @@ find_wildcard( char *s )
 
 		case '\\':
 			s++; /* skip over escape */
+			if ( *s == '\0' )
+				return NULL;	/* escape at end of string */
 			if( hex2value( s[0] ) >= 0 && hex2value( s[1] ) >= 0 ) {
 				/* skip over lead digit of two hex digit code */
 				s++;
-- 
GitLab