aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroni-link <knil.ino@gmail.com>2014-04-17 17:05:48 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-17 17:49:12 -0300
commitca4005d759d933e71dfd5bf1539992c9ed23b3ca (patch)
treef52d3fd21d3724f126bd46b69baf8d2e773e1a08 /src
parent85b5a75a6971254756e1c8b03be3fd5473a31382 (diff)
downloadrneovim-ca4005d759d933e71dfd5bf1539992c9ed23b3ca.tar.gz
rneovim-ca4005d759d933e71dfd5bf1539992c9ed23b3ca.tar.bz2
rneovim-ca4005d759d933e71dfd5bf1539992c9ed23b3ca.zip
vim-patch:7.4.245
Problem: Crash for "vim -u NONE -N -c '&&'". Solution: Check for the pattern to be NULL. (Dominique Pelle) https://code.google.com/p/vim/source/detail?r=80421d934ebde183ce545ab8d9eb3a4c2065c169
Diffstat (limited to 'src')
-rw-r--r--src/ex_cmds.c4
-rw-r--r--src/version.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 5d23893be4..b56b9f8867 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3661,8 +3661,8 @@ void do_sub(exarg_T *eap)
// more efficient.
// TODO: find a generic solution to make line-joining operations more
// efficient, avoid allocating a string that grows in size.
- if (strcmp((const char *)pat, "\\n") == 0
- && strlen((const char *)pat) == 2
+ if (pat != NULL
+ && strcmp((const char *)pat, "\\n") == 0
&& *sub == NUL
&& (*cmd == NUL || (cmd[1] == NUL
&& (*cmd == 'g'
diff --git a/src/version.c b/src/version.c
index 7807ca8a41..d6076d665b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -215,7 +215,7 @@ static int included_patches[] = {
//248,
//247,
//246,
- //245,
+ 245,
//244,
//243,
//242,