]> granicus.if.org Git - apache/commitdiff
mod_dav: Do not segfault on PROPFIND with a zero length DBM. PR 52559
authorGraham Leggett <minfrin@apache.org>
Sun, 12 May 2013 10:26:22 +0000 (10:26 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 12 May 2013 10:26:22 +0000 (10:26 +0000)
trunk patch: http://svn.apache.org/r1476645
Submitted by: Diego Santa Cruz <diego.santaCruz spinetix.com>
Reviewed by: minfrin, covener, sf

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

CHANGES
STATUS
modules/dav/main/props.c

diff --git a/CHANGES b/CHANGES
index 34cb3ed2fdb5966bf8a6885fa4f3b19e35d91259..c63b7f13f582e26b1ff788f67e326e82ba5562b5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.5
 
+  *) mod_dav: Do not segfault on PROPFIND with a zero length DBM.
+     PR 52559 [Diego Santa Cruz <diego.santaCruz spinetix.com>]
+
   *) core: Improve error message where client's request-line exceeds
      LimitRequestLine. PR 54384 [Christophe Jaillet]
 
diff --git a/STATUS b/STATUS
index b98600185c16c930f7409c3bd8262448c78d1dac..b4233a948a669677a2de26a3ededfea6df0440c8 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -90,11 +90,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
-      trunk patch: http://svn.apache.org/r1476645
-      2.4.x patch: trunk patch works (minus CHANGES)
-      +1: minfrin, covener, sf
-
     * event MPM: Provide error handling for ThreadStackSize. PR 54311
       trunk patch: http://svn.apache.org/r1433682
       2.4.x patch: http://people.apache.org/~minfrin/httpd-event-ThreadStackSize-error.patch
index d87dd61131657c57e334bd70915c35765cb01428..e5eaef165a46637efcb0ad469eb360140b997d54 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