]> granicus.if.org Git - apache/commitdiff
Fix the lifetime of the autodata buffer used for the chunk header.
authorJeff Trawick <trawick@apache.org>
Thu, 28 Sep 2000 22:57:17 +0000 (22:57 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 28 Sep 2000 22:57:17 +0000 (22:57 +0000)
Submitted by: Bill Stoddard
Reviewed by: Jeff Trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86352 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_core.c

index 14745d1dd131015b3545f2a27890d06de99ef359..ab35d2cd9b157e2f3ec22a364739876a9c149961 100644 (file)
@@ -3008,6 +3008,7 @@ static apr_status_t chunk_filter(ap_filter_t *f, ap_bucket_brigade *b)
     for (more = NULL; b; b = more, more = NULL) {
        apr_off_t bytes = 0;
         ap_bucket *eos = NULL;
+        char chunk_hdr[20]; /* enough space for the snprintf below */
 
        AP_BRIGADE_FOREACH(e, b) {
            if (e->type == AP_BUCKET_EOS) {
@@ -3055,7 +3056,6 @@ static apr_status_t chunk_filter(ap_filter_t *f, ap_bucket_brigade *b)
 
         /* if there are content bytes, then wrap them in a chunk */
         if (bytes > 0) {
-            char chunk_hdr[20]; /* enough space for the snprintf below */
             apr_size_t hdr_len;
 
             /*