diff src/syntax.c @ 7504:013f285f31a6 v7.4.1054

commit https://github.com/vim/vim/commit/2795e21eaafaeaf95a91667fd411023280d0f902 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 5 22:04:49 2016 +0100 patch 7.4.1054 Problem: Illegal memory access. Solution: Check for missing pattern. (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Tue, 05 Jan 2016 22:15:04 +0100
parents ef568437e49a
children 616460b73ee3
line wrap: on
line diff
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -5833,6 +5833,11 @@ syn_cmd_sync(eap, syncing)
 	}
 	else if (STRCMP(key, "LINECONT") == 0)
 	{
+	    if (*next_arg == NUL)	   /* missing pattern */
+	    {
+		illegal = TRUE;
+		break;
+	    }
 	    if (curwin->w_s->b_syn_linecont_pat != NULL)
 	    {
 		EMSG(_("E403: syntax sync: line continuations pattern specified twice"));