To: vim-dev@vim.org Subject: Patch 6.1.009 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.009 Problem: Vim crashes when using a huge number for the maxwid value in a statusline. (Robert M. Nowotniak) Solution: Check for an overflow that makes maxwid negative. Files: src/buffer.c *** ../vim61.008/src/buffer.c Sat Mar 23 22:31:35 2002 --- src/buffer.c Sun Apr 7 22:23:07 2002 *************** *** 2998,3003 **** --- 2998,3005 ---- maxwid += *s - '0'; s++; } + if (maxwid <= 0) /* overflow */ + maxwid = 50; } minwid = (minwid > 50 ? 50 : minwid) * l; if (*s == '(') *** ../vim61.008/src/version.c Fri Apr 5 20:13:03 2002 --- src/version.c Sun Apr 7 22:27:04 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 9, /**/ -- From "know your smileys": 8-O "Omigod!!" (done "rm -rf *" ?) /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///