Sat May 21 09:02:08 2011 UTC ()
Pullup ticket #3436 - requested by drochner
devel/apr: security patch

Revisions pulled up:
- devel/apr/Makefile                                            1.63
- devel/apr/distinfo                                            1.31
- devel/apr/patches/patch-aa                                    1.5

---
   Module Name:    pkgsrc
   Committed By:   drochner
   Date:           Fri May 20 09:23:16 UTC 2011

   Modified Files:
           pkgsrc/devel/apr: Makefile distinfo
   Added Files:
           pkgsrc/devel/apr/patches: patch-aa

   Log Message:
   add patch from upstream tp fix a regression in the last release
   which could cause hangs
   bump PKGREV


(tron)
diff -r1.61.4.1 -r1.61.4.2 pkgsrc/devel/apr/Makefile
diff -r1.29.4.1 -r1.29.4.2 pkgsrc/devel/apr/distinfo
diff -r0 -r1.5.2.2 pkgsrc/devel/apr/patches/patch-aa

cvs diff -r1.61.4.1 -r1.61.4.2 pkgsrc/devel/apr/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/apr/Makefile 2011/05/15 09:32:37 1.61.4.1
+++ pkgsrc/devel/apr/Makefile 2011/05/21 09:02:08 1.61.4.2
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
1# $NetBSD: Makefile,v 1.61.4.1 2011/05/15 09:32:37 sbd Exp $ 1# $NetBSD: Makefile,v 1.61.4.2 2011/05/21 09:02:08 tron Exp $
2 2
3DISTNAME= apr-1.4.4 3DISTNAME= apr-1.4.4
 4PKGREVISION= 1
4CATEGORIES= devel 5CATEGORIES= devel
5MASTER_SITES= ${MASTER_SITE_APACHE:=apr/} 6MASTER_SITES= ${MASTER_SITE_APACHE:=apr/}
6EXTRACT_SUFX= .tar.bz2 7EXTRACT_SUFX= .tar.bz2
7 8
8MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://apr.apache.org/ 10HOMEPAGE= http://apr.apache.org/
10COMMENT= Apache Portable Runtime 11COMMENT= Apache Portable Runtime
11LICENSE= apache-2.0 12LICENSE= apache-2.0
12 13
13PKG_DESTDIR_SUPPORT= user-destdir 14PKG_DESTDIR_SUPPORT= user-destdir
14 15
15PKG_INSTALLATION_TYPES= overwrite pkgviews 16PKG_INSTALLATION_TYPES= overwrite pkgviews
16 17

cvs diff -r1.29.4.1 -r1.29.4.2 pkgsrc/devel/apr/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/apr/distinfo 2011/05/15 09:32:37 1.29.4.1
+++ pkgsrc/devel/apr/distinfo 2011/05/21 09:02:08 1.29.4.2
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
1$NetBSD: distinfo,v 1.29.4.1 2011/05/15 09:32:37 sbd Exp $ 1$NetBSD: distinfo,v 1.29.4.2 2011/05/21 09:02:08 tron Exp $
2 2
3SHA1 (apr-1.4.4.tar.bz2) = d05cd65ec169c06174ca7c8978179289777f8dae 3SHA1 (apr-1.4.4.tar.bz2) = d05cd65ec169c06174ca7c8978179289777f8dae
4RMD160 (apr-1.4.4.tar.bz2) = 3715774150253d024d79fcf3295f39f822229b85 4RMD160 (apr-1.4.4.tar.bz2) = 3715774150253d024d79fcf3295f39f822229b85
5Size (apr-1.4.4.tar.bz2) = 759604 bytes 5Size (apr-1.4.4.tar.bz2) = 759604 bytes
 6SHA1 (patch-aa) = 5fb9bc6157c24884efd5d42179ceec0e0af448eb

File Added: pkgsrc/devel/apr/patches/Attic/patch-aa
$NetBSD: patch-aa,v 1.5.2.2 2011/05/21 09:02:08 tron Exp $

--- strings/apr_fnmatch.c.orig	2011-05-03 04:51:24.000000000 +0000
+++ strings/apr_fnmatch.c
@@ -196,7 +196,10 @@ APR_DECLARE(int) apr_fnmatch(const char 
     const char *mismatch = NULL;
     int matchlen = 0;
 
-    while (*pattern)
+    if (*pattern == '*')
+        goto firstsegment;
+
+    while (*pattern && *string)
     {
         /* Match balanced slashes, starting a new segment pattern
          */
@@ -207,6 +210,7 @@ APR_DECLARE(int) apr_fnmatch(const char 
             ++string;
         }            
 
+firstsegment:
         /* At the beginning of each segment, validate leading period behavior.
          */
         if ((flags & APR_FNM_PERIOD) && (*string == '.'))
@@ -361,9 +365,9 @@ APR_DECLARE(int) apr_fnmatch(const char 
             return APR_FNM_NOMATCH;
     }
 
-    /* pattern is at EOS; if string is also, declare success
+    /* Where both pattern and string are at EOS, declare success
      */
-    if (!*string)
+    if (!*string && !*pattern)
         return 0;
 
     /* pattern didn't match to the end of string */