summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-01-25 20:11:01 +0100
committerBram Moolenaar <Bram@vim.org>2013-01-25 20:11:01 +0100
commit2f315ab7bec2713d2fb986c5d863f15ab9949166 (patch)
tree198597e524e0ce236a06404fa01de5508892b760 /src
parent826763f87b4a15fb125b3b5cc3fc308a5976bfaf (diff)
downloadvim-2f315ab7bec2713d2fb986c5d863f15ab9949166.zip
updated for version 7.3.785
Problem: Crash with specific use of search pattern. Solution: Initialize reg_buf to curbuf.
Diffstat (limited to 'src')
-rw-r--r--src/regexp.c9
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/src/regexp.c b/src/regexp.c
index bb63c942f..e62aae557 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -3413,7 +3413,7 @@ static unsigned reg_tofreelen;
* reg_startpos <invalid> reg_mmatch->startpos
* reg_endpos <invalid> reg_mmatch->endpos
* reg_win NULL window in which to search
- * reg_buf <invalid> buffer in which to search
+ * reg_buf curbuf buffer in which to search
* reg_firstlnum <invalid> first line in which to search
* reg_maxline 0 last line nr
* reg_line_lbr FALSE or TRUE FALSE
@@ -3571,6 +3571,7 @@ vim_regexec(rmp, line, col)
reg_mmatch = NULL;
reg_maxline = 0;
reg_line_lbr = FALSE;
+ reg_buf = curbuf;
reg_win = NULL;
ireg_ic = rmp->rm_ic;
#ifdef FEAT_MBYTE
@@ -3595,6 +3596,7 @@ vim_regexec_nl(rmp, line, col)
reg_mmatch = NULL;
reg_maxline = 0;
reg_line_lbr = TRUE;
+ reg_buf = curbuf;
reg_win = NULL;
ireg_ic = rmp->rm_ic;
#ifdef FEAT_MBYTE
@@ -4311,8 +4313,8 @@ regmatch(scan)
#endif
else
{
- if (!vim_iswordc_buf(c, reg_buf)
- || (reginput > regline && vim_iswordc_buf(reginput[-1], reg_buf)))
+ if (!vim_iswordc_buf(c, reg_buf) || (reginput > regline
+ && vim_iswordc_buf(reginput[-1], reg_buf)))
status = RA_NOMATCH;
}
break;
@@ -7135,6 +7137,7 @@ vim_regsub(rmp, source, dest, copy, magic, backslash)
reg_match = rmp;
reg_mmatch = NULL;
reg_maxline = 0;
+ reg_buf = curbuf;
return vim_regsub_both(source, dest, copy, magic, backslash);
}
#endif
diff --git a/src/version.c b/src/version.c
index 9a94c54da..0f77ad255 100644
--- a/src/version.c
+++ b/src/version.c
@@ -726,6 +726,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 785,
+/**/
784,
/**/
783,