From: Brian Pane Date: Wed, 26 Dec 2001 08:58:55 +0000 (+0000) Subject: Fixed calculation of bucket lengths X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1911a696b47f80717363f71be79d88c6c1be586d;p=apache Fixed calculation of bucket lengths git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92601 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 9046bf38cf..53ccaafd68 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -799,13 +799,11 @@ static int include_cgi(char *s, request_rec *r, ap_filter_t *next, APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck); tmp2_buck = apr_bucket_heap_create(location, len_loc, 1); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); - /* XXX: this looks like a bug: should be sizeof - 1 */ - tmp2_buck = apr_bucket_immortal_create("\">", sizeof("\">")); + tmp2_buck = apr_bucket_immortal_create("\">", sizeof("\">") - 1); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); tmp2_buck = apr_bucket_heap_create(location, len_loc, 1); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); - /* XXX: this looks like a bug: should be sizeof - 1 */ - tmp2_buck = apr_bucket_immortal_create("", sizeof("")); + tmp2_buck = apr_bucket_immortal_create("", sizeof("") - 1); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); if (*inserted_head == NULL) { diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 637434eb8d..c4fb1d7620 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -1118,13 +1118,11 @@ static int include_cgi(char *s, request_rec *r, ap_filter_t *next, APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck); tmp2_buck = apr_bucket_heap_create(location, len_loc, 1); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); - /* XXX: this looks like a bug: should be sizeof - 1 */ - tmp2_buck = apr_bucket_immortal_create("\">", sizeof("\">")); + tmp2_buck = apr_bucket_immortal_create("\">", sizeof("\">") - 1); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); tmp2_buck = apr_bucket_heap_create(location, len_loc, 1); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); - /* XXX: this looks like a bug: should be sizeof - 1 */ - tmp2_buck = apr_bucket_immortal_create("", sizeof("")); + tmp2_buck = apr_bucket_immortal_create("", sizeof("") - 1); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); if (*inserted_head == NULL) {