[Pkg-dspam-misc] Bug#688853: dspam: long line in message body causes '530 5.2.0 Message is empty. Aborting.'

Thomas Preud'homme robotux at debian.org
Wed Sep 26 13:09:04 UTC 2012

severity 688853 grave

Le mercredi 26 septembre 2012 14:40:20, Thomas Preud'homme a écrit :
> Le mercredi 26 septembre 2012 11:07:09, vous avez écrit :
> > Package: dspam
> > Version: 3.10.1+dfsg-3~bpo60+1
> > Severity: critical
> > 
> > 
> > dspam sends '530 5.2.0 Message is empty. Aborting.' while receiving
> > incorrect spam message with long-long line, for example with length
> > about 300K bytes:
> From what I read so far, dspam only reads a maximum of 1023 bytes per line
> but discard the whole line after that. I guess because of this it must be
> confuse by the quantity of bytes read and continues to read when there is
> no more data. The error you mention is raised by dspam when a message is
> empty.
> I'll continue to investigate.

Sorry I read to fast. What happen is that dspam read data from the socket by 
block of 1023 bytes and then search for a line in it by searching for the 
newline character with strchr. If it doesn't find a newline character, it 
returns NULL in cascade from pop_buffer up to read_sock through daemon_getline. 
When this returns NULL, it consider there is an error and return the error you 
saw. I didn't think much about it yet but I think a solution should be easy.

> Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-dspam-misc/attachments/20120926/681be78d/attachment.pgp>

More information about the Pkg-dspam-misc mailing list