From 7bf8213396ddc042da4af9450672bc2577555ce9 Mon Sep 17 00:00:00 2001 From: leitner Date: Tue, 2 Mar 2004 23:35:00 +0000 Subject: [PATCH] fix substring matches (Zak Johnson) --- THANKS | 5 ++++- ldap_match_mapped.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/THANKS b/THANKS index 36dd33a..ac50d08 100644 --- a/THANKS +++ b/THANKS @@ -6,4 +6,7 @@ David Lichteblau found lots of problems in the ASN.1 code. Thomas Walpuski has found lots of problems with the LDAP code. -Dirk Meyer helped BSD portability +Dirk Meyer helped BSD portability. + +Zak Johnson fixed substring matches in ldap_match_mapped. + diff --git a/ldap_match_mapped.c b/ldap_match_mapped.c index a8a5078..7e627c8 100644 --- a/ldap_match_mapped.c +++ b/ldap_match_mapped.c @@ -31,8 +31,8 @@ found: case any: { unsigned long len=str_len(attr); - if (len>x->s.l) return 0; - for (i=0; is.l-len; ++i) + if (lens.l) return 0; + for (i=0; i<=len-x->s.l; ++i) if (!diff(x->s.s,x->s.l,attr+i)) goto found; }