Commit 342898d0 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

Fix a segfault in ap_http_filter(). I hit the segfault while

discarding the body of a request, but it could affect other paths.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87684 13f79535-47bb-0310-9956-ffa450edef68
parent 172b7131
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
Changes with Apache 2.0b1

  *) Fix a segfault in ap_http_filter().  I hit the segfault while 
     discarding the body of a request, but it could affect other paths.
     [Jeff Trawick]

  *) Some adjustment on the handling and automatic setting (via
     hints.m4) of various compilation flags (eg: CFLAGS). Also,
     add the capability to specify flags (NOTEST_CFLAGS and
+5 −4
Original line number Diff line number Diff line
@@ -1015,6 +1015,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, ap_bucket_brigade *b, ap_input_mode_
    if (f->c->remain) {
        e = AP_BRIGADE_FIRST(ctx->b);
        while (e != AP_BRIGADE_SENTINEL(ctx->b)) {
            ap_bucket *old;
            const char *ignore;

            if ((rv = ap_bucket_read(e, &ignore, &len, mode)) != APR_SUCCESS) {
@@ -1037,11 +1038,11 @@ apr_status_t ap_http_filter(ap_filter_t *f, ap_bucket_brigade *b, ap_input_mode_
                AP_BRIGADE_INSERT_TAIL(b, e);
                break; /* once we've gotten some data, deliver it to caller */
            }
            else {
                AP_BUCKET_REMOVE(e);
                ap_bucket_destroy(e);
            }

            old = e;
            e = AP_BUCKET_NEXT(e);
            AP_BUCKET_REMOVE(old);
            ap_bucket_destroy(old);
        }
        if (f->c->remain == 0) {
            ap_bucket *eos = ap_bucket_create_eos();