From: Stefan Fritsch Date: Sun, 18 Aug 2013 16:30:21 +0000 (+0000) Subject: Limit SHMCB_MAX_SIZE to min(UINT_MAX, APR_SIZE_MAX) to match the current code X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fba2ae052b53584c43026b7f6a0e268df7c3f0c1;p=thirdparty%2Fapache%2Fhttpd.git Limit SHMCB_MAX_SIZE to min(UINT_MAX, APR_SIZE_MAX) to match the current code git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1515162 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/mod_socache_shmcb.c b/modules/cache/mod_socache_shmcb.c index d01d6515f21..a2e56a10151 100644 --- a/modules/cache/mod_socache_shmcb.c +++ b/modules/cache/mod_socache_shmcb.c @@ -30,7 +30,14 @@ #include "ap_socache.h" -#define SHMCB_MAX_SIZE APR_SIZE_MAX +/* XXX Unfortunately, there are still many unsigned ints in use here, so we + * XXX cannot allow more than UINT_MAX. Since some of the ints are exposed in + * XXX public interfaces, a simple search and replace is not enough. + * XXX It should be possible to extend that so that the total cache size can + * XXX be APR_SIZE_MAX and only the object size needs to be smaller than + * XXX UINT_MAX. + */ +#define SHMCB_MAX_SIZE (UINT_MAX