]> granicus.if.org Git - apache/commitdiff
Fixed calculation of bucket lengths
authorBrian Pane <brianp@apache.org>
Wed, 26 Dec 2001 08:58:55 +0000 (08:58 +0000)
committerBrian Pane <brianp@apache.org>
Wed, 26 Dec 2001 08:58:55 +0000 (08:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92601 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_cgi.c
modules/generators/mod_cgid.c

index 9046bf38cfb8ffd5634dea4b854a0b55f67592a5..53ccaafd6811c620a9622e3418742c01cd34bf4f 100644 (file)
@@ -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("</A>", sizeof("</A>"));
+        tmp2_buck = apr_bucket_immortal_create("</A>", sizeof("</A>") - 1);
         APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck);
 
         if (*inserted_head == NULL) {
index 637434eb8dfd109f75c5a11eb9b61fc96df17a13..c4fb1d7620c1dfdeb3d81c191be0c149c3794b4d 100644 (file)
@@ -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("</A>", sizeof("</A>"));
+        tmp2_buck = apr_bucket_immortal_create("</A>", sizeof("</A>") - 1);
         APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck);
 
         if (*inserted_head == NULL) {