0
0
mirror of https://github.com/vim/vim.git synced 2025-10-15 07:14:09 -04:00

updated for version 7.4.245

Problem:    Crash for "vim -u NONE -N  -c '&&'".
Solution:   Check for the pattern to be NULL. (Dominique Pelle)
This commit is contained in:
Bram Moolenaar
2014-04-04 19:00:48 +02:00
parent 57a728d1df
commit 21e854e5ce
2 changed files with 3 additions and 1 deletions

View File

@@ -4425,7 +4425,7 @@ do_sub(eap)
* TODO: find a generic solution to make line-joining operations more
* efficient, avoid allocating a string that grows in size.
*/
if (STRCMP(pat, "\\n") == 0 && STRLEN(pat) == 2
if (pat != NULL && STRCMP(pat, "\\n") == 0
&& *sub == NUL
&& (*cmd == NUL || (cmd[1] == NUL && (*cmd == 'g' || *cmd == 'l'
|| *cmd == 'p' || *cmd == '#'))))

View File

@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
245,
/**/
244,
/**/