summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-10 20:54:17 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-10 20:54:17 +0100
commit507edf63df75fe228e0f76b845b58d60266e65d8 (patch)
tree360a0b6bdd05365981e0fbf27feb55138a21cf10 /src/buffer.c
parenta52dfaed104183c1fa2a3b6e4430b23d86bcbece (diff)
patch 7.4.1086v7.4.1086
Problem: Crash with an extremely long buffer name. Solution: Limit the return value of vim_snprintf(). (Dominique Pelle)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index d1907a44fc..fd94a27449 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2793,6 +2793,8 @@ buflist_list(eap)
(buf->b_flags & BF_READERR) ? 'x'
: (bufIsChanged(buf) ? '+' : ' '),
NameBuff);
+ if (len > IOSIZE - 20)
+ len = IOSIZE - 20;
/* put "line 999" in column 40 or after the file name */
i = 40 - vim_strsize(IObuff);