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.

bfd096d020
This commit is contained in:
James McCoy
2016-11-15 16:38:33 -05:00
parent 4453aa0d29
commit 486e968bb6
3 changed files with 17 additions and 1 deletions

View File

@@ -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);