jerenkrantz 2002/12/29 13:17:22
Modified: . CHANGES
strmatch apr_strmatch.c
Log:
Fix bug in apr_strmatch when used with case-insensitive patterns.
We must lowercase the s_next value in order to generate the proper
shift character when in match_boyer_moore_horspool_nocase.
Revision Changes Path
1.91 +3 -0 apr-util/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr-util/CHANGES,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -u -r1.90 -r1.91
--- CHANGES 23 Dec 2002 20:36:23 -0000 1.90
+++ CHANGES 29 Dec 2002 21:17:21 -0000 1.91
@@ -1,5 +1,8 @@
Changes with APR-util 0.9.2
+ *) Fix bug in apr_strmatch when used with case-insensitive patterns.
+ [Justin Erenkrantz]
+
*) Allow apr_queue to have greater than int number of elements.
[Justin Erenkrantz]
1.6 +1 -1 apr-util/strmatch/apr_strmatch.c
Index: apr_strmatch.c
===================================================================
RCS file: /home/cvs/apr-util/strmatch/apr_strmatch.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -u -r1.5 -r1.6
--- apr_strmatch.c 25 May 2002 00:04:57 -0000 1.5
+++ apr_strmatch.c 29 Dec 2002 21:17:21 -0000 1.6
@@ -112,7 +112,7 @@
}
s_tmp--;
}
- s_next += shift[(int)*((const unsigned char *)s_next)];
+ s_next += shift[apr_tolower(*s_next)];
}
return NULL;
}