From 486e968bb6bdfb49d17305d6f7747408eda95926 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 15 Nov 2016 16:38:33 -0500 Subject: vim-patch:7.4.2225 Problem: Crash when placing a sign in a deleted buffer. Solution: Check for missing buffer name. (Dominique Pelle). Add a test. https://github.com/vim/vim/commit/bfd096d02087a10e8e2f4bdfb74e0435506fa8bb --- src/nvim/ex_cmds.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/ex_cmds.c') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 42af5989a1..a53e8657cb 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -5675,6 +5675,10 @@ void ex_sign(exarg_T *eap) } else { // ... not currently in a window + if (buf->b_fname == NULL) { + EMSG(_("E934: Cannot jump to a buffer that does not have a name")); + return; + } char *cmd = xmalloc(STRLEN(buf->b_fname) + 25); sprintf(cmd, "e +%" PRId64 " %s", (int64_t)lnum, buf->b_fname); -- cgit