apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r779879 - in /apr/apr-util/branches/1.4.x: CHANGES strmatch/apr_strmatch.c
Date Fri, 29 May 2009 07:48:33 GMT
Author: wrowe
Date: Fri May 29 07:48:33 2009
New Revision: 779879

URL: http://svn.apache.org/viewvc?rev=779879&view=rev
Log:
Fix underflow in apr_strmatch_precompile.

Submitted by: Matthew Palmer <mpalmer debian.org>


Modified:
    apr/apr-util/branches/1.4.x/CHANGES
    apr/apr-util/branches/1.4.x/strmatch/apr_strmatch.c

Modified: apr/apr-util/branches/1.4.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/CHANGES?rev=779879&r1=779878&r2=779879&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/CHANGES [utf-8] (original)
+++ apr/apr-util/branches/1.4.x/CHANGES [utf-8] Fri May 29 07:48:33 2009
@@ -1,6 +1,9 @@
                                                      -*- coding: utf-8 -*-
 Changes with APR-util 1.4.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-util/branches/1.4.x/strmatch/apr_strmatch.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/strmatch/apr_strmatch.c?rev=779879&r1=779878&r2=779879&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/strmatch/apr_strmatch.c (original)
+++ apr/apr-util/branches/1.4.x/strmatch/apr_strmatch.c Fri May 29 07:48:33 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;



Mime
View raw message