[antispam-f] Re: String too long at line 4216

  • From: Frank de Bruijn <antispam@xxxxxxxxxx>
  • To: antispam@xxxxxxxxxxxxx
  • Date: Sun, 24 Jun 2007 08:35:22 +0200

In article <4ef7cfa340lists@xxxxxxxx>,
   lists (ww) <lists@xxxxxxxx> wrote:
> Suddenly one of my mailboxes fails when fetching and AS quits.
> 'String too long at line 4216 (4216)'

AS version 1.59, revision 7, I assume?

> Nothing was done to the computer to initiate this. So I thought: maybe
> there's a problem email there.

Correct.

> So via webmail I deleted a few spams and tried AS again. Ecco! all is
> well.

> What was  the error message telling me?

While decoding an 'encoded word' (see RFC2047), the reconstructed header
string became longer than 255 characters. This is unusual, as decoding
should always result in a string shorter than the original.
Earlier versions of AntiSpam could crash on this function if the 'end of
encoded word' marker was missing. From version 1.54 this should have
been fixed, though.

I'm guessing the header causing the problem contained an end marker
before a start marker. That shouldn't happen of course, but neither
should spam. Changing the bit in line 4206 that reads

  E%=INSTR(h$,"?=")

to

  E%=INSTR(h$,"?=",D%)

should take care of this.

Regards,
Frank


P.S.
In AS 1.60 alpha 5 line 4206 has moved to 4257.


Other related posts: