From: Henrik Grubbström Date: Fri, 25 Nov 2011 15:59:00 GMT Subject: Re: Infinite loop in cascade_filter_fn() Message-ID: In-Reply-To: <20111125155301.GC10417@beez.lab.cmartin.tk> On Fri, 25 Nov 2011, Carlos Martín Nieto wrote: > On Fri, Nov 25, 2011 at 04:43:41PM +0100, Henrik Grubbström wrote: >> >> The bug is probably that lf_to_crlf_filter_fn() should return >> non-zero in this case (ie o and/or i being zero). > > non-zero? That would cause the filter to abort, which definitely not > what we want. Have you seen my other e-mails regarding this? I'm > trying to figure out which is the best way to go about this. The > solution is to keep track of the fact that we're missing a LF in the > output buffer. True, I misread the code. Keeping track of the filter state is the way to go. > cmn -- Henrik Grubbström grubba@roxen.com Roxen Internet Software AB