aboutsummaryrefslogtreecommitdiffstats
path: root/lib/regexec.c
diff options
context:
space:
mode:
authorPaul Eggert2019-11-26 13:14:42 -0800
committerPaul Eggert2019-11-26 13:15:41 -0800
commit1b9dbca826ad8a742ab22719279f5ce3c5888a67 (patch)
treeafd37873182a84f6708c19105fedca1b4d58ddd2 /lib/regexec.c
parent50b52390ee5894e91965bd37f2d0c571df1e2e89 (diff)
downloademacs-1b9dbca826ad8a742ab22719279f5ce3c5888a67.tar.gz
emacs-1b9dbca826ad8a742ab22719279f5ce3c5888a67.zip
Update from Gnulib
This incorporates: 2019-11-24 Fix errors in C++ mode on mingw 2019-11-24 time_r: Fix for mingw (regression from 2019-11-16) 2019-11-24 sys_time: Fix errors in C++ mode on mingw 2019-11-22 intprops: INT_MULTIPLY_WRAPV speedup for GCC 8.4+ 2019-11-21 Disable many _GL_CXXALIASWARN on non-glibc 2019-11-21 Fix various errors in _GL_CXXALIAS_SYS invocations 2019-11-19 intprops: INT_MULTIPLY_WRAPV speedup for GCC 9.3+ 2019-11-18 stdint: Define [u]intptr_t correctly on 64-bit native Windows 2019-11-18 stdint: Fix value of WINT_MAX when we override wint_t 2019-11-18 stdint: Avoid "conflicting types" error on mingw 5.22 2019-11-16 time_r: Fix for mingw 2019-11-06 regex: now back in sync with glibc * lib/intprops.h, lib/regexec.c, lib/signal.in.h: * lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h: * lib/string.in.h, lib/sys_select.in.h, lib/sys_time.in.h: * lib/time.in.h, lib/unistd.in.h, m4/time_r.m4: Copy from Gnulib.
Diffstat (limited to 'lib/regexec.c')
-rw-r--r--lib/regexec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/regexec.c b/lib/regexec.c
index c5dc6220b2d..03a6b65047e 100644
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -1266,10 +1266,13 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
1266 if (type == OP_BACK_REF) 1266 if (type == OP_BACK_REF)
1267 { 1267 {
1268 Idx subexp_idx = dfa->nodes[node].opr.idx + 1; 1268 Idx subexp_idx = dfa->nodes[node].opr.idx + 1;
1269 naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; 1269 if (subexp_idx < nregs)
1270 naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so;
1270 if (fs != NULL) 1271 if (fs != NULL)
1271 { 1272 {
1272 if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) 1273 if (subexp_idx >= nregs
1274 || regs[subexp_idx].rm_so == -1
1275 || regs[subexp_idx].rm_eo == -1)
1273 return -1; 1276 return -1;
1274 else if (naccepted) 1277 else if (naccepted)
1275 { 1278 {