2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-30 21:55:20 +00:00

postfix-2.3-20060315

This commit is contained in:
Wietse Venema
2006-03-15 00:00:00 -05:00
committed by Viktor Dukhovni
parent dc10960061
commit 9ea736c8a7
4 changed files with 28 additions and 3 deletions

View File

@@ -12043,6 +12043,13 @@ Apologies for any names omitted.
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

View File

@@ -20,7 +20,7 @@
* 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

View File

@@ -178,8 +178,7 @@ static int dict_pcre_expand(int type, VSTRING *buf, char *ptr)
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);
@@ -591,6 +590,7 @@ static DICT_PCRE_RULE *dict_pcre_parse_rule(const char *mapname, int lineno,
int dict_flags)
{
char *p;
int actual_sub;
p = line;
@@ -662,6 +662,23 @@ static DICT_PCRE_RULE *dict_pcre_parse_rule(const char *mapname, int lineno,
*/
if (dict_pcre_compile(mapname, lineno, &regexp, &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.

View File

@@ -2,6 +2,7 @@
./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