From: Paul Eggert Date: Mon, 11 Nov 2019 21:04:02 +0000 (-0800) Subject: autoupdate X-Git-Tag: v1.0~4610 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=b3b1e95ca1de55cef8fa04b165c48b2178bb545d;p=gnulib.git autoupdate --- diff --git a/build-aux/ar-lib b/build-aux/ar-lib index f64465e4f4..be8806a2fe 100755 --- a/build-aux/ar-lib +++ b/build-aux/ar-lib @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -65,7 +65,7 @@ func_file_conv () mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin) + cygwin | msys) file=`cygpath -m "$file" || echo "$file"` ;; wine) diff --git a/build-aux/compile b/build-aux/compile index d23d320dd1..be68b4b287 100755 --- a/build-aux/compile +++ b/build-aux/compile @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ func_file_conv () mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff --git a/lib/regexec.c b/lib/regexec.c index 3c46ac81dd..38b6d6719a 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, if (type == OP_BACK_REF) { Idx subexp_idx = dfa->nodes[node].opr.idx + 1; - naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; + if (subexp_idx < nregs) + naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; if (fs != NULL) { - if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) + if (subexp_idx >= nregs + || regs[subexp_idx].rm_so == -1 + || regs[subexp_idx].rm_eo == -1) return -1; else if (naccepted) {