Return-Path: Delivered-To: apmail-httpd-bugs-archive@httpd.apache.org Received: (qmail 874 invoked by uid 500); 11 Jul 2003 03:04:37 -0000 Mailing-List: contact bugs-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: "Apache HTTPD Bugs Notification List" Delivered-To: mailing list bugs@httpd.apache.org Received: (qmail 862 invoked from network); 11 Jul 2003 03:04:37 -0000 Date: 11 Jul 2003 03:07:14 -0000 Message-ID: <20030711030714.208.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: bugs@httpd.apache.org Cc: Subject: DO NOT REPLY [Bug 21095] - SSI error X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21095 SSI error ------- Additional Comments From jwoolley@apache.org 2003-07-11 03:07 ------- Andre: you read my mind about the bucket_next() thing. I was just about to point that out. :) An alternative would be to do: if (len == 0) { /* end of pipe? */ - break; + apr_bucket *next_dptr = APR_BUCKET_NEXT(dptr); + apr_bucket_delete(dptr); + dptr = next_dptr; + continue; } OH! But hang on. There's a bug in both cases: if (dptr) becomes the sentinel we must not continue; we have to break. Otherwise we'll segfault the next time through the loop when we try to call apr_bucket_read() on the sentinel. That is, no doubt, why it was break; before -- a pipe bucket was probably always the last bucket in the brigade when we hit that case during the testing. The code was wrong, but it would have worked in that instance. Try this patch instead: Index: mod_include.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v retrieving revision 1.233 diff -u -d -r1.233 mod_include.c --- mod_include.c 3 Feb 2003 17:53:01 -0000 1.233 +++ mod_include.c 11 Jul 2003 03:03:25 -0000 @@ -429,7 +429,13 @@ } if (len == 0) { /* end of pipe? */ - break; + apr_bucket *next_dptr = APR_BUCKET_NEXT(dptr); + apr_bucket_delete(dptr); + dptr = next_dptr; + if (dptr == APR_BRIGADE_SENTINEL(bb)) { + break; + } + continue; } /* Set our buffer to use. */ @@ -600,7 +606,13 @@ } if (len == 0) { /* end of pipe? */ - break; + apr_bucket *next_dptr = APR_BUCKET_NEXT(dptr); + apr_bucket_delete(dptr); + dptr = next_dptr; + if (dptr == APR_BRIGADE_SENTINEL(bb)) { + break; + } + continue; } if (dptr == ctx->tag_start_bucket) { c = buf + ctx->tag_start_index; --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org