git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix regext substring capture variables for null matches. Bug 2933
[exim.git]
/
src
/
src
/
exim.c
diff --git
a/src/src/exim.c
b/src/src/exim.c
index b3fd9eff0a3782cb402c925e265ddf5e2f129bb1..47a685aa7b45da1c66fc6402625874b38dd3d1aa 100644
(file)
--- a/
src/src/exim.c
+++ b/
src/src/exim.c
@@
-134,6
+134,8
@@
if ((yield = (res >= 0)))
PCRE2_SIZE len;
pcre2_substring_get_bynumber(md, matchnum,
(PCRE2_UCHAR **)&expand_nstring[expand_nmax], &len);
PCRE2_SIZE len;
pcre2_substring_get_bynumber(md, matchnum,
(PCRE2_UCHAR **)&expand_nstring[expand_nmax], &len);
+ if (!expand_nstring[expand_nmax])
+ { expand_nstring[expand_nmax] = US""; len = 0; }
expand_nlength[expand_nmax++] = (int)len;
}
expand_nmax--;
expand_nlength[expand_nmax++] = (int)len;
}
expand_nmax--;