summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-06-28 23:04:42 +0200
committerBram Moolenaar <Bram@vim.org>2013-06-28 23:04:42 +0200
commit4d9ae21a342a3c81913e9f41b362778989b0c564 (patch)
tree60103f08a14d1fa85e8194a50a76e085f0dd0822 /src
parente3a0b53c2e8985e51174f01ee58f8746ea2c45a9 (diff)
downloadvim-4d9ae21a342a3c81913e9f41b362778989b0c564.zip
updated for version 7.3.1258
Problem: Using submatch() may crash Vim. (Ingo Karkat) Solution: Restore the number of subexpressions used.
Diffstat (limited to 'src')
-rw-r--r--src/regexp_nfa.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 8146d9d61..bd3818d71 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -5198,6 +5198,8 @@ nfa_regmatch(prog, start, submatch, m)
|| t->state->c == NFA_START_INVISIBLE_BEFORE_FIRST
|| t->state->c == NFA_START_INVISIBLE_BEFORE_NEG_FIRST)
{
+ int in_use = m->norm.in_use;
+
/* Copy submatch info for the recursive call, so that
* \1 can be matched. */
copy_sub_off(&m->norm, &t->subs.norm);
@@ -5231,6 +5233,7 @@ nfa_regmatch(prog, start, submatch, m)
add_here = TRUE;
add_state = t->state->out1->out;
}
+ m->norm.in_use = in_use;
}
else
{
diff --git a/src/version.c b/src/version.c
index 4980ae570..d8a6f3804 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1258,
+/**/
1257,
/**/
1256,