Re: Endless loop in split_on_bdry() of library/parser_multipart.c?

Bojan Smojver <[email protected]>
Newsgroups gmane.comp.apache.apreq
Message-ID <[email protected]>
Quoting Joe Schaefer <[email protected]>:

> Are you sure the "intermediate code" is correct?
> It's calling free and destroy, which makes me think
> that's some other "delete buckets" loop, not this one.>

Nice catch! The correct snippet is:

-------------------------------
             do {
                 apr_bucket *f = (&(in)->list)->next;
                 do { (((((f))))->link.prev)->link.next =  
((((f))))->link.next; (((((f))))->link.next)->link.prev =  
((((f))))->link.prev; } while (0);
                 do { apr_bucket *ap__b = (f); do {  
((((ap__b))))->link.next = ((struct apr_bucket *)((char  
*)(((&(out)->list))) - ((long) (((char *) (&(((struct  
apr_bucket*)((void *)0))->link))) - ((char *) ((void *)0))))));  
((((ap__b))))->link.prev = (((struct apr_bucket *)((char  
*)(((&(out)->list))) - ((long) (((char *) (&(((struct  
apr_bucket*)((void *)0))->link))) - ((char *) ((void  
*)0)))))))->link.prev; ((((struct apr_bucket *)((char  
*)(((&(out)->list))) - ((long) (((char *) (&(((struct  
apr_bucket*)((void *)0))->link))) - ((char *) ((void  
*)0)))))))->link.prev)->link.next = (((ap__b))); (((struct apr_bucket  
*)((char *)(((&(out)->list))) - ((long) (((char *) (&(((struct  
apr_bucket*)((void *)0))->link))) - ((char *) ((void  
*)0)))))))->link.prev = (((ap__b))); } while (0); ; } while (0);
             } while (e != (&(in)->list)->next);
-------------------------------

Thanks Joe!

PS. Fixed Bugzilla too.

-- 
Bojan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.