Re: mutt/1537: Strange regexp behaviour: missing/ empty headers aren't checked for "empty" pattern match
Synopsis: Strange regexp behaviour: missing/ empty headers aren't checked for
"empty" pattern match
**** Comment added by rado on Thu, 25 Aug 2005 14:29:59 +0200 ****
After sleeping over it and checking source again (beware, I just looked at
pattern.c,
I'm no expert for the whole code, so I have no idea about ill side-effects),
how about changing this:
return (pat->not ^ (h->env->subject && regexec (pat->rx, h->env->subject, 0,
NULL, 0) == 0));
to maybe something like this:
return (pat->not ^ (regexec (pat->rx, h->env->subject ? h->env->subject : ""
, 0, NULL, 0) == 0));
For the other headers accordingly.