From: Joe Orton Date: Thu, 8 Jan 2026 13:26:41 +0000 (+0000) Subject: * modules/dav/main/ms_wdv.c (mswdv_combined_proppatch): Drop redundant X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bf7c9c34e5091894993b43a42639a3fd10d1418;p=thirdparty%2Fapache%2Fhttpd.git * modules/dav/main/ms_wdv.c (mswdv_combined_proppatch): Drop redundant check of proppatch_len against APR_SIZE_MAX, update comment. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1931184 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/dav/main/ms_wdv.c b/modules/dav/main/ms_wdv.c index bff0689922..4e748683d6 100644 --- a/modules/dav/main/ms_wdv.c +++ b/modules/dav/main/ms_wdv.c @@ -619,15 +619,17 @@ static dav_error *mswdv_combined_proppatch(request_rec *r) return dav_new_error(r->pool, HTTP_BAD_REQUEST, 0, status, "Bad PROPPATCH part length"); - /* Validate PROPPATCH length against configured limits */ + /* Validate PROPPATCH length against configured limits. Note + * ap_get_limit_xml_body() has a maximum of AP_MAX_LIMIT_XML_BODY + * giving a safe upper bound to in-memory caching. */ limit = ap_get_limit_xml_body(r); if (limit > 0 && proppatch_len > limit) { return dav_new_error(r->pool, HTTP_REQUEST_ENTITY_TOO_LARGE, 0, 0, "PROPPATCH part length exceeds configured limit"); } - if (proppatch_len <= 0 || proppatch_len > (apr_off_t)APR_SIZE_MAX) { - return dav_new_error(r->pool, HTTP_REQUEST_ENTITY_TOO_LARGE, 0, 0, - "PROPPATCH part length invalid or too large"); + if (proppatch_len <= 0) { + return dav_new_error(r->pool, HTTP_BAD_REQUEST, 0, 0, + "invalid or negative PROPPATCH part length"); } apr_brigade_destroy(bb);