You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2009/05/29 09:47:53 UTC
svn commit: r779878 - in /apr/apr/trunk: CHANGES strmatch/apr_strmatch.c
Author: wrowe
Date: Fri May 29 07:47:52 2009
New Revision: 779878
URL: http://svn.apache.org/viewvc?rev=779878&view=rev
Log:
Fix underflow in apr_strmatch_precompile.
Submitted by: Matthew Palmer <mpalmer debian.org>
Modified:
apr/apr/trunk/CHANGES
apr/apr/trunk/strmatch/apr_strmatch.c
Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=779878&r1=779877&r2=779878&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES [utf-8] (original)
+++ apr/apr/trunk/CHANGES [utf-8] Fri May 29 07:47:52 2009
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes for APR 2.0.0
+ *) Fix underflow in apr_strmatch_precompile.
+ [Matthew Palmer <mpalmer debian.org>]
+
*) Fix off by one overflow in apr_brigade_vprintf.
[C. Michael Pilato <cmpilato collab.net>]
Modified: apr/apr/trunk/strmatch/apr_strmatch.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/strmatch/apr_strmatch.c?rev=779878&r1=779877&r2=779878&view=diff
==============================================================================
--- apr/apr/trunk/strmatch/apr_strmatch.c (original)
+++ apr/apr/trunk/strmatch/apr_strmatch.c Fri May 29 07:47:52 2009
@@ -103,13 +103,13 @@
if (case_sensitive) {
pattern->compare = match_boyer_moore_horspool;
for (i = 0; i < pattern->length - 1; i++) {
- shift[(int)s[i]] = pattern->length - i - 1;
+ shift[(unsigned char)s[i]] = pattern->length - i - 1;
}
}
else {
pattern->compare = match_boyer_moore_horspool_nocase;
for (i = 0; i < pattern->length - 1; i++) {
- shift[apr_tolower(s[i])] = pattern->length - i - 1;
+ shift[(unsigned char)apr_tolower(s[i])] = pattern->length - i - 1;
}
}
pattern->context = shift;