From 507edf63df75fe228e0f76b845b58d60266e65d8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 10 Jan 2016 20:54:17 +0100 Subject: [PATCH] patch 7.4.1086 Problem: Crash with an extremely long buffer name. Solution: Limit the return value of vim_snprintf(). (Dominique Pelle) --- src/buffer.c | 2 ++ src/version.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/buffer.c b/src/buffer.c index d1907a44f..fd94a2744 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); diff --git a/src/version.c b/src/version.c index 07d2c2631..b753f174e 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1086, /**/ 1085, /**/ -- 2.50.1