summaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-17 22:29:09 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-17 22:29:09 +0200
commitbfd096d02087a10e8e2f4bdfb74e0435506fa8bb (patch)
tree5ae40d74396c8c0ade0f33230b5b8c813aeac8b1 /src/ex_cmds.c
parentaf9c4c9b5761c4c074237d87e2c95713bf721eab (diff)
downloadvim-git-bfd096d02087a10e8e2f4bdfb74e0435506fa8bb.tar.gz
patch 7.4.2225v7.4.2225
Problem: Crash when placing a sign in a deleted buffer. Solution: Check for missing buffer name. (Dominique Pelle). Add a test.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index aeb2bf952..919aafc7c 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -7861,6 +7861,11 @@ ex_sign(exarg_T *eap)
{ /* ... not currently in a window */
char_u *cmd;
+ if (buf->b_fname == NULL)
+ {
+ EMSG(_("E934: Cannot jump to a buffer that does not have a name"));
+ return;
+ }
cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
if (cmd == NULL)
return;