To: vim_dev@googlegroups.com Subject: Patch 7.4.1086 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1086 Problem: Crash with an extremely long buffer name. Solution: Limit the return value of vim_snprintf(). (Dominique Pelle) Files: src/buffer.c *** ../vim-7.4.1085/src/buffer.c 2015-11-24 18:45:52.637647023 +0100 --- src/buffer.c 2016-01-10 20:42:05.891534713 +0100 *************** *** 2793,2798 **** --- 2793,2800 ---- (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); *** ../vim-7.4.1085/src/version.c 2016-01-10 20:21:50.836727126 +0100 --- src/version.c 2016-01-10 20:43:12.982807064 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 1086, /**/ -- System administrators are just like women: You can't live with them and you can't live without them. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///