From: Stefan Fritsch Date: Tue, 29 May 2012 18:42:22 +0000 (+0000) Subject: Backport the relevant bits from r1227856: X-Git-Tag: 2.2.23~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30e558adbb8263a5c4ec0790eb6dcfaec8fea9db;p=thirdparty%2Fapache%2Fhttpd.git Backport the relevant bits from r1227856: Cure size_t abuse Reviewed by: wrowe, rpluem, jorton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1343907 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 4607d4a8d15..9b725717a3b 100644 --- a/STATUS +++ b/STATUS @@ -93,14 +93,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_proxy: cure size_t abuse part 1, backport relevant bits of r1227856, - Specifically normalizes ap_proxy_string_read so that the prototype - agrees with the actual implementation, which I believe is a bug fix - as opposed to an actual API change, ergo no MMN bump necessary(?). - Branch patch: - http://svn.apache.org/viewvc?rev=1227860&view=rev - +1: wrowe, rpluem, jorton - * configure: Using external apr and apu in non-default path breaks configure, since checking for apu version does not set up apr include path in CPPFLAGS. diff --git a/modules/proxy/ajp_msg.c b/modules/proxy/ajp_msg.c index eef2a5381a1..fd9780cda6a 100644 --- a/modules/proxy/ajp_msg.c +++ b/modules/proxy/ajp_msg.c @@ -274,7 +274,7 @@ apr_status_t ajp_msg_append_uint8(ajp_msg_t *msg, apr_byte_t value) apr_status_t ajp_msg_append_string_ex(ajp_msg_t *msg, const char *value, int convert) { - size_t len; + apr_size_t len; if (value == NULL) { return(ajp_msg_append_uint16(msg, 0xFFFF)); diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h index f602fb04b52..97bb8c68a9f 100644 --- a/modules/proxy/mod_proxy.h +++ b/modules/proxy/mod_proxy.h @@ -493,7 +493,7 @@ PROXY_DECLARE(int) ap_proxy_is_hostname(struct dirconn_entry *This, apr_pool_t * PROXY_DECLARE(int) ap_proxy_is_word(struct dirconn_entry *This, apr_pool_t *p); PROXY_DECLARE(int) ap_proxy_checkproxyblock(request_rec *r, proxy_server_conf *conf, apr_sockaddr_t *uri_addr); PROXY_DECLARE(int) ap_proxy_pre_http_request(conn_rec *c, request_rec *r); -PROXY_DECLARE(apr_status_t) ap_proxy_string_read(conn_rec *c, apr_bucket_brigade *bb, char *buff, size_t bufflen, int *eos); +PROXY_DECLARE(apr_status_t) ap_proxy_string_read(conn_rec *c, apr_bucket_brigade *bb, char *buff, apr_size_t bufflen, int *eos); PROXY_DECLARE(void) ap_proxy_table_unmerge(apr_pool_t *p, apr_table_t *t, char *key); /* DEPRECATED (will be replaced with ap_proxy_connect_backend */ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **, const char *, apr_sockaddr_t *, const char *, proxy_server_conf *, server_rec *, apr_pool_t *); diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 95f4a784fce..a86c63d42fd 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1149,14 +1149,14 @@ PROXY_DECLARE(const char *) ap_proxy_cookie_reverse_map(request_rec *r, proxy_req_conf *rconf = ap_get_module_config(r->request_config, &proxy_module); struct proxy_alias *ent; - size_t len = strlen(str); + apr_size_t len = strlen(str); const char *newpath = NULL; const char *newdomain = NULL; const char *pathp; const char *domainp; const char *pathe = NULL; const char *domaine = NULL; - size_t l1, l2, poffs = 0, doffs = 0; + apr_size_t l1, l2, poffs = 0, doffs = 0; int i; int ddiff = 0; int pdiff = 0;