httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: Endless loop in split_on_bdry() of library/parser_multipart.c?
Date Mon, 12 Jun 2006 00:31:19 GMT
"Philip M. Gollucci" <pgollucci@p6m7g8.com> writes:

>             do {
>                 apr_bucket *f = APR_BRIGADE_FIRST(in);
>                 APR_BUCKET_REMOVE(f);
>                 APR_BRIGADE_INSERT_TAIL(out, f);
>             } while (e != APR_BRIGADE_FIRST(in));

This loop appends all the buckets before e onto the end of out.

>
>           apr_bucket *f = APR_RING_FIRST(&in->list);
>           apr_bucket *l = APR_RING_LAST(&in->list);

That l is wrong, it should point at APR_BUCKET_PREV(e) 
(which is not the sentinel).

>
>           APR_RING_UNSPLICE(f, l, link);
>           APR_RING_SPLICE_TAIL(&out->list, f, l, apr_bucket, link);
>

This is the right approach, I think.  But the person who'd be
in the best place to test/commit it is Bojan.  Just be sure
to bump the patch level in apreq_version.h, and add a comment
to CHANGES.

-- 
Joe Schaefer


Mime
View raw message