]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_dav: Do not segfault on PROPFIND with a zero length DBM.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 27 Jun 2013 17:21:42 +0000 (17:21 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 27 Jun 2013 17:21:42 +0000 (17:21 +0000)
PR: 52559
Backports: r1476645
Submitted by: Diego Santa Cruz <diego.santaCruz spinetix.com>
Reviewed by: rjung, wrowe, trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1497463 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/dav/main/props.c

diff --git a/CHANGES b/CHANGES
index cee983c249f700c7a5204829e2d0da62dbf5b7e1..91f544ba7cef83e396aed8c382540dd414d7ff7a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -54,6 +54,9 @@ Changes with Apache 2.2.25
   *) mod_dav: Do not fail PROPPATCH when prop namespace is not known.
      PR 52559 [Diego Santa Cruz <diego.santaCruz spinetix.com>]
 
+  *) mod_dav: Do not segfault on PROPFIND with a zero length DBM.
+     PR 52559 [Diego Santa Cruz <diego.santaCruz spinetix.com>]
+
 Changes with Apache 2.2.24
 
   *) SECURITY: CVE-2012-3499 (cve.mitre.org)
diff --git a/STATUS b/STATUS
index affca73ef1a7e9e8bce6e4d8f6589b82e8934080..320464742d64aa15294ac0f9c763841923120fb8 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -96,15 +96,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
   
-  * mod_dav: Do not segfault on PROPFIND with a zero length DBM. PR 52559
-    [Diego Santa Cruz <diego.santaCruz spinetix.com>]
-    This is the third patch in PR 52559. The other two are already
-    voted on above.
-    trunk patch: http://svn.apache.org/r1476645
-    2.4.x patch: http://svn.apache.org/r1481513
-    2.2.x patch: trunk patch works (minus CHANGES)
-    +1: rjung, wrowe, trawick
-
   * mod_ssl/proxy: enable the SNI extension for backend TLS connections
     [Kaspar Brand]
     2.2.x patch: http://people.apache.org/~rjung/patches/r1175416-2.0-v2.patch
index b9601d78a7e6fecf0eba2fddecf63bb5309b2c5f..2796737772970817f854b623e726cb566b4dac6c 100644 (file)
@@ -594,13 +594,14 @@ DAV_DECLARE(dav_get_props_result) dav_get_allprops(dav_propdb *propdb,
         if (propdb->db != NULL) {
             dav_xmlns_info *xi = dav_xmlns_create(propdb->p);
             dav_prop_name name;
+            dav_error *err;
 
             /* define (up front) any namespaces the db might need */
             (void) (*db_hooks->define_namespaces)(propdb->db, xi);
 
             /* get the first property name, beginning the scan */
-            (void) (*db_hooks->first_name)(propdb->db, &name);
-            while (name.ns != NULL) {
+            err = (*db_hooks->first_name)(propdb->db, &name);
+            while (!err && name.ns) {
 
                 /*
                 ** We also look for <DAV:getcontenttype> and
@@ -619,7 +620,6 @@ DAV_DECLARE(dav_get_props_result) dav_get_allprops(dav_propdb *propdb,
                 }
 
                 if (what == DAV_PROP_INSERT_VALUE) {
-                    dav_error *err;
                     int found;
 
                     if ((err = (*db_hooks->output_value)(propdb->db, &name,
@@ -638,7 +638,7 @@ DAV_DECLARE(dav_get_props_result) dav_get_allprops(dav_propdb *propdb,
                 }
 
               next_key:
-                (void) (*db_hooks->next_name)(propdb->db, &name);
+                err = (*db_hooks->next_name)(propdb->db, &name);
             }
 
             /* all namespaces have been entered into xi. generate them into