]> granicus.if.org Git - vim/commitdiff
patch 7.4.1086 v7.4.1086
authorBram Moolenaar <Bram@vim.org>
Sun, 10 Jan 2016 19:54:17 +0000 (20:54 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 10 Jan 2016 19:54:17 +0000 (20:54 +0100)
Problem:    Crash with an extremely long buffer name.
Solution:   Limit the return value of vim_snprintf(). (Dominique Pelle)

src/buffer.c
src/version.c

index d1907a44fccb140bd6f22fccba2928ff784c503d..fd94a274494819fd945ccf8db48665c349286ee6 100644 (file)
@@ -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);
index 07d2c26319318841f7ae69959cf4b1b185ff1ca4..b753f174ed8db263ed8a41813ba4022d99f111dc 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1086,
 /**/
     1085,
 /**/