From: Joe Orton Date: Fri, 30 Jan 2004 13:13:30 +0000 (+0000) Subject: * modules/http/http_protocol.c (ap_make_method_list): Fix possible X-Git-Tag: 2.0.49~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58c4de2755cf02f13dfa0b693295fe2930a0f0b2;p=thirdparty%2Fapache%2Fhttpd.git * modules/http/http_protocol.c (ap_make_method_list): Fix possible memory corruption. Submitted by: Jeff Trawick Reviewed by: Joe Orton, Andr�� Malo git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@102461 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 9e208883534..59a2ef34509 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.49 + *) Build array of allowed methods with proper dimensions, fixing + possible memory corruption. [Jeff Trawick] + *) mod_ssl: Fix potential segfault on lookup of SSL_SESSION_ID. PR 15057. [Otmar Lendl ] diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 7be48da8600..6e4128237fb 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -2470,7 +2470,7 @@ AP_DECLARE(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts) ml = (ap_method_list_t *) apr_palloc(p, sizeof(ap_method_list_t)); ml->method_mask = 0; - ml->method_list = apr_array_make(p, sizeof(char *), nelts); + ml->method_list = apr_array_make(p, nelts, sizeof(char *)); return ml; }