From: Graham Leggett Date: Sat, 27 Apr 2013 17:38:45 +0000 (+0000) Subject: mod_dav: When a PROPPATCH attempts to remove a non-existent dead X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5345db8652fa82e18380dfb44291927850b8767b;p=thirdparty%2Fapache%2Fhttpd.git mod_dav: When a PROPPATCH attempts to remove a non-existent dead property on a resource for which there is no dead property in the same namespace httpd segfaults. PR 52559 Submitted by Diego Santa Cruz Tested by William Lewis git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1476642 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 88b2af112c1..c5f27bcb6fb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_dav: When a PROPPATCH attempts to remove a non-existent dead + property on a resource for which there is no dead property in the same + namespace httpd segfaults. PR 52559 [Diego Santa Cruz + ] + *) mod_dav: PROPPATCH delete (svn propdel) silently discards errors. PR 53525 [Arwin Arni ] diff --git a/modules/dav/fs/dbm.c b/modules/dav/fs/dbm.c index 53a97e91f2a..9089373991a 100644 --- a/modules/dav/fs/dbm.c +++ b/modules/dav/fs/dbm.c @@ -731,6 +731,10 @@ static dav_error * dav_propdb_get_rollback(dav_db *db, static dav_error * dav_propdb_apply_rollback(dav_db *db, dav_deadprop_rollback *rollback) { + if (!rollback) { + return NULL; /* no rollback, nothing to do */ + } + if (rollback->value.dptr == NULL) { /* don't fail if the thing isn't really there. */ (void) dav_dbm_delete(db, rollback->key);