[antispam-f] Re: Antispam and RegEx

  • From: Steven Pampling <steve.pampling@xxxxxxxxxxxxx>
  • To: antispam@xxxxxxxxxxxxx
  • Date: Tue, 07 Nov 2006 18:03:36 +0000 (GMT)

On 07 Nov, Martin <freelists@xxxxxxxxxxxxxxxx> wrote:

> The problem is when an expression is first longer then 128 characters.
> Some storage is expanded and moved, but a pointer within it is NOT moved.
> This means that writes are to the wrong place (nasty) and the subsequent
> read only sees the first 128 bytes and then rubbish, often leading to
> 'Invalid Range end' Compile errors which helpfully disappear when you try
> it again.

A work around is to compile the pattern as 255 characters right at the
start, thereafter the storage used is constant. (As far as I could tell -
when I was playing with the module sometime back I don't think the rather
useful Reporter was a functional as it is today)

> I have notified Stefan Bellon of this problem, and a possible fix which
> appears to work.

-- 

Steve Pampling

Other related posts: