*************************************************/
/* Copyright (c) University of Cambridge 1995 - 2018 */
-/* Copyright (c) The Exim Maintainers 2020 */
+/* Copyright (c) The Exim Maintainers 2020 - 2021 */
/* See the file NOTICE for conditions of use and distribution. */
/* Functions for matching strings */
if (pattern[0] == '^')
{
- const pcre * re = regex_must_compile(pattern, cb->caseless, FALSE);
+ const pcre2_code * re = regex_must_compile(pattern, cb->caseless, FALSE);
if (expand_setup < 0
- ? pcre_exec(re, NULL, CCS s, Ustrlen(s), 0, PCRE_EOPT, NULL, 0) < 0
+ ? !regex_match(re, s, -1, NULL)
: !regex_match_and_setup(re, s, 0, expand_setup)
)
return FAIL;
/* For an unnamed list, use the expanded version in comments */
#define LIST_LIMIT_PR 2048
-HDEBUG(D_any) if (!ot)
+HDEBUG(D_any) if (!ot)
{
int n, m;
gstring * g = string_fmt_append(NULL, "%s in \"%n%.*s%n\"",
patterns.) Otherwise just the domain is lower cases. A magic item "+caseful" in
the list can be used to restore a caseful copy of the local part from the
original address.
-Limit the subject address size to avoid mem-exhastion attacks. The size chosen
+Limit the subject address size to avoid mem-exhaustion attacks. The size chosen
is historical (we used to use big_buffer here). */
if ((len = Ustrlen(address)) > BIG_BUFFER_SIZE) len = BIG_BUFFER_SIZE;