[PATCH] non-compliant encoded text causes 0.15.3 segfault

David Relson relson at osagesoftware.com
Thu Sep 11 16:13:58 CEST 2003


On Thu, 11 Sep 2003 15:49:37 +0200
Matthias Andree <matthias.andree at gmx.de> wrote:

> David Relson <relson at osagesoftware.com> writes:
> 
> > Here's a patch that fixes the segfault caused by the non-compliant
> > encoded text.  This should get you going.
> 
> David, could you have a look at "splint" and run "splint -weak" on
> code before committing? Chances are good that splint will catch faults
> like not checking str* functions for NULL and avoid the NULL
> dereference that haunts the lexer code (in fact, any C code).
> http://www.splint.org/
> 
> Please apologize if this mail is unfriendly, I'm very frustrated at
> CUPS; it is IMPOSSIBLE to get this Z!/()"§(("!% blood sucking software
> to accept a default printer configuration. All files are set up to
> default to lp, yet the beast insists on LJ. I'd say that any software
> beyond half a Megabyte (CUPS is like 10 MB Or 100 MB with drivers
> don't know) is broken beyond repair by design, and this does comprise
> lexer_v3.*...

Matthias,

I've downloaded splint and will see if it's helpful or not.

The encoded text problem is caused by a mismatch between the lexer
pattern and the C code.  The code expects properly formed encoded tokens
and is failing because it's getting something else.  The NULL checks are
a defensive mechanism, not a proper fix.  Probably the lexer pattern
needs to be changed to provide the C code with valid input.  However,
the code in program size of changing the pattern may be too much.  For
now, NULL checks are the way to go.  Later, I'll see about revising the
pattern.

I understand the frustrations of computers.  You can count on that. 
Right now, I've got an NT box that won't see network shares (though the
Win98 box does) and I'm also dealing with a variety of glitches in
sylpheed-claws (which is up to 0.9.5 as of yesterday).

Cheers!

David




More information about the Bogofilter mailing list