To: vim-dev@vim.org Subject: Patch 5.7.010 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.7.010 Problem: When using CTRL-A on a very long number Vim can crash. (Michael Naumann) Solution: Truncate the length of the new number to avoid a buffer overflow. Files: src/ops.c *** ../vim-5.7.9/src/ops.c Fri Jun 2 12:28:27 2000 --- src/ops.c Fri Oct 6 17:55:14 2000 *************** *** 3940,3945 **** --- 3940,3949 ---- --length; } + /* truncate to max length of a number */ + if (length >= NUMBUFLEN - 1) + length = NUMBUFLEN - 2; + /* * Put the number characters in buf2[]. */ *** ../vim-5.7.9/src/version.c Mon Aug 7 09:59:44 2000 --- src/version.c Fri Oct 6 18:06:45 2000 *************** *** 439,440 **** --- 439,442 ---- { /* Add new patch number below this line */ + /**/ + 10, /**/ -- hundred-and-one symptoms of being an internet addict: 196. Your computer costs more than your car. /// Bram Moolenaar Bram@moolenaar.net http://www.moolenaar.net \\\ \\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///