Workaround: don't consume in_flow tokens when incoming mail
is placed on hold. Back-ported from Postfix 2.3. File:
cleanup/cleanup_api.c.
+
+20060310
+
+ Workaround: null-terminate the input after stripping CR,
+ and before passing the input to the MIME processor. Leandro
+ Santi. The fix, a rewrite of the MIME processor input
+ handling, is too much change for a stable release. File:
+ sendmail/sendmail.c.
+
+ 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.
* Patches change the patchlevel and the release date. Snapshots change the
* release date only.
*/
-#define MAIL_RELEASE_DATE "20060221"
-#define MAIL_VERSION_NUMBER "2.2.9"
+#define MAIL_RELEASE_DATE "20060315"
+#define MAIL_VERSION_NUMBER "2.2.10-RC1"
#define VAR_MAIL_VERSION "mail_version"
#ifdef SNAPSHOT
skip_from_ = 0;
}
if (strip_cr == STRIP_CR_DO && type == REC_TYPE_NORM)
- if (VSTRING_LEN(buf) > 0 && vstring_end(buf)[-1] == '\r')
+ if (VSTRING_LEN(buf) > 0 && vstring_end(buf)[-1] == '\r') {
vstring_truncate(buf, VSTRING_LEN(buf) - 1);
+ VSTRING_TERMINATE(buf);
+ }
if ((flags & SM_FLAG_AEOF) && prev_type != REC_TYPE_CONT
&& VSTRING_LEN(buf) == 1 && *STR(buf) == '.')
break;
ctxt->matches, n, &pp);
if (ret < 0) {
if (ret == PCRE_ERROR_NOSUBSTRING)
- msg_fatal("regexp %s, line %d: replace index out of range",
- ctxt->mapname, ctxt->lineno);
+ return (MAC_PARSE_UNDEF);
else
msg_fatal("regexp %s, line %d: pcre_get_substring error: %d",
ctxt->mapname, ctxt->lineno, ret);
int dict_flags)
{
char *p;
+ int actual_sub;
p = line;
*/
if (dict_pcre_compile(mapname, lineno, ®exp, &engine) == 0)
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);
+ 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
true: not found
+> get true1
true1=1
+> get true2
true2: not found
+> get truefalse2
truefalse2=2
+> get 3
3: not found
+> get true3
true3=3
+> get c
c=
+> get d
d: not found
+> get 1234
1234=(1)(2)(3)(4)
+> get 123
123=(1)(2)(3)
+> get bar/find
bar/find: not found
+> get bar/whynot
bar/whynot=Don't have a liquor license
+> get bar/elbereth
bar/elbereth=(elbereth)
+> get say/elbereth
say/elbereth: not found