longer manipulate the mail expiration schedule, so that
mail "on hold" could expire too soon.
+20060315
+
+ Workaround. the PCRE library reports an inappropriate error
+ code (invalid substring) when $number refers to a valid ()
+ expression that matches the null string. This caused fatal
+ run-time errors. File: dict_pcre.c.
+
Wish list:
The sendmail command should not return non-std exit status
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20060313"
+#define MAIL_RELEASE_DATE "20060315"
#define MAIL_VERSION_NUMBER "2.3"
#ifdef SNAPSHOT
ctxt->matches, n, &pp);
if (ret < 0) {
if (ret == PCRE_ERROR_NOSUBSTRING)
- msg_fatal("regexp %s, line %d: replace index out of range",
- dict_pcre->dict.name, match_rule->rule.lineno);
+ return (MAC_PARSE_UNDEF);
else
msg_fatal("regexp %s, line %d: pcre_get_substring error: %d",
dict_pcre->dict.name, match_rule->rule.lineno, ret);
int dict_flags)
{
char *p;
+ int actual_sub;
p = line;
*/
if (dict_pcre_compile(mapname, lineno, ®exp, &engine) == 0)
CREATE_MATCHOP_ERROR_RETURN(0);
+#ifdef PCRE_INFO_CAPTURECOUNT
+ if (pcre_fullinfo(engine.pattern, engine.hints,
+ PCRE_INFO_CAPTURECOUNT,
+ (void *) &actual_sub) != 0)
+ msg_panic("pcre map %s, line %d: pcre_fullinfo failed",
+ mapname, lineno);
+ if (prescan_context.max_sub > actual_sub) {
+ msg_warn("regexp map %s, line %d: out of range replacement index \"%d\": "
+ "skipping this rule", mapname, lineno,
+ (int) prescan_context.max_sub);
+ if (engine.pattern)
+ myfree((char *) engine.pattern);
+ if (engine.hints)
+ myfree((char *) engine.hints);
+ CREATE_MATCHOP_ERROR_RETURN(0);
+ }
+#endif
/*
* Save the result.
./dict_open: warning: pcre map dict_pcre.map, line 5: ignoring extra text after ENDIF
./dict_open: warning: pcre map dict_pcre.map, line 8: unknown regexp option "!": skipping this rule
./dict_open: warning: dict_pcre.map, line 9: no replacement text: using empty string
+./dict_open: warning: regexp map dict_pcre.map, line 10: out of range replacement index "5": skipping this rule
./dict_open: warning: pcre map dict_pcre.map, line 17: $number found in negative match replacement text: skipping this rule
./dict_open: warning: pcre map dict_pcre.map, line 22: no regexp: skipping this rule
> get true