procmail
[Top] [All Lists]

Re: MATCH bug?

1998-06-23 13:27:38
dattier(_at_)wwa(_dot_)com (David W. Tamkin) writes:
| my understanding is that this is the stingy vs. greedy race condition
| in the context of \/ operation.
| 
|     From someone(_at_)somewhere(_dot_)com  Fri Jun 19 18:51:56 1998
|                                ==================
| 
|     [^ ]+ +.*\/..:

But there's no chance for stinginess or greediness here; there are no
characters that can allow a choice (such as ?, *, or +).  MATCH should
take in two characters and a colon (or nothing at all if the entire
expression isn't matched).

|         ..:         # The preceding "." regexps match anything

Not anything, but any two non-newline characters, and there have to be
exactly two.  Stan was right: this is a bug.  I've played around a little,
and procmail 3.11pre7 treats   (anything non-null, even .)+.*\/  as
(whatever was plussed)+\/.*  .

When I first looked at the code for procmail's regexp engine I wondered
how it got away with only having a single "start of match" pointer.  At
the time, I figured he had something magic going on.  Well, he didn't.
This is bug.  I'll take a look at fixing it, but work is being
particularly stressful right now, so no promises (it's a bad sign when
you mistake your cat for an ethernet switch).

Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>