To: vim-dev@vim.org Subject: Patch 6.0.129 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.129 Problem: When using a very long file name, ":ls" (repeated a few times) causes a crash. Test with "vim `perl -e 'print "A"x1000'`". (Tejeda) Solution: Terminate a string before getting its length in buflist_list(). Files: src/buffer.c *** ../vim60.128/src/buffer.c Wed Sep 19 12:37:17 2001 --- src/buffer.c Sat Jan 12 16:35:12 2002 *************** *** 2091,2096 **** --- 2091,2097 ---- len = (int)STRLEN(IObuff); STRNCPY(IObuff + len, NameBuff, IOSIZE - 20 - len); + IObuff[IOSIZE - 20 - len] = NUL; /* make sure it's terminated */ len = (int)STRLEN(IObuff); IObuff[len++] = '"'; *** ../vim60.128/src/version.c Sat Jan 12 16:22:05 2002 --- src/version.c Sat Jan 12 16:39:02 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 129, /**/ -- BLACK KNIGHT: I'm invincible! ARTHUR: You're a looney. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim ))) \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///