fix substring matches (Zak Johnson)

This commit is contained in:
leitner
2004-03-02 23:35:00 +00:00
parent fbc0865c50
commit 7bf8213396
2 changed files with 6 additions and 3 deletions

5
THANKS
View File

@@ -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.

View File

@@ -31,8 +31,8 @@ found:
case any:
{
unsigned long len=str_len(attr);
if (len>x->s.l) return 0;
for (i=0; i<x->s.l-len; ++i)
if (len<x->s.l) return 0;
for (i=0; i<=len-x->s.l; ++i)
if (!diff(x->s.s,x->s.l,attr+i))
goto found;
}