BF hangs on base64 message

David Relson relson at osagesoftware.com
Fri Jan 24 02:43:07 CET 2003


Gyepi,

Bogofilter 0.10.1 hangs were reported by Greg Louis, Chris Wilkes, and 
Ronald Cole.  Unexpected EOF's were the cause of the problem.  I have 
committed changes to lexer.c and html.c that fix the problems.

I assume you're talking about the code you sent a few days back.  It _is_ 
much simpler than my code.  My code used to be simpler, but grew complex as 
I coded for the likelihood of multiline comments and multiline comment 
headers and trailers.  The present code handles "<\n!\n-\n-" which the 
simpler code does not.  If the additional capability is unnecessary, we can 
simplify.

David

At 08:30 PM 1/23/03, Gyepi SAM wrote:

>On Thu, Jan 23, 2003 at 07:31:28PM -0500, David Relson wrote:
> > At 06:50 PM 1/23/03, Chris Wilkes wrote:
> >
> > >Hi,
> > >
> > >  I'm testing out BF 0.10 and it hangs on the following message at
> > >        http://ladro.com/bf/base64hang.txt
> > I'll take a look at the message and see what kind of nonsense it provides
> > and what kind of nonsensical response bogofilter is makeing.  I'll keep 
> you
> > posted.
>
>The non-text stuff at the top of the decoded message is a red herring.
>
>I investigated this error and narrowed down to html.c lines 75 - 78, which
>are executed when 'kill_html_comments == true'.
>
>As I mentioned some time ago, that code is too hairy for me so I did not 
>change it.
>I do have a much simpler piece of code that does the same thing if you are 
>interested...
>
>The real problem appears to be a bad interaction with the base64 decoder.

Are you working on the fgetsl() buffer overflow complaints or the 
hangs?  The hangs are fixed by further checking the value returned by 
buff_fill().  The base64 decoder hasn't been a problem for what I've looked at.


>When I replace the encoded content with its decoded analog (mmencode -u), 
>there's no
>problem.
>
>
>-Gyepi





More information about the bogofilter-dev mailing list