[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apr-cvs
Subject:    svn commit: r779994 - in /apr/apr-util/branches/0.9.x: CHANGES
From:       wrowe () apache ! org
Date:       2009-05-29 14:34:33
Message-ID: 20090529143433.A1E112388872 () eris ! apache ! org
[Download RAW message or body]

Author: wrowe
Date: Fri May 29 14:34:33 2009
New Revision: 779994

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

Submitted by: Matthew Palmer <mpalmer debian.org>

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic