To: vim-dev@vim.org Subject: Patch 6.1b.002 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1b.002 Problem: A regexp that ends in "\{" is not flagged as an error. May cause a stack overflow when 'incsearch' is set. (Gerhard Hochholzer) Solution: Handle a missing "}" as an error. Files: src/regexp.c *** ../vim61b.001/src/regexp.c Wed Feb 27 17:13:22 2002 --- src/regexp.c Mon Mar 11 21:39:06 2002 *************** *** 2485,2492 **** *maxval = MAX_LIMIT; /* It was \{} or \{-} */ if (*regparse == '\\') regparse++; /* Allow either \{...} or \{...\} */ ! if ( (*regparse != '}' && *regparse != NUL) ! || (*maxval == 0 && *minval == 0)) { sprintf((char *)IObuff, _("Syntax error in %s{...}"), reg_magic == MAGIC_ALL ? "" : "\\"); --- 2485,2491 ---- *maxval = MAX_LIMIT; /* It was \{} or \{-} */ if (*regparse == '\\') regparse++; /* Allow either \{...} or \{...\} */ ! if (*regparse != '}' || (*maxval == 0 && *minval == 0)) { sprintf((char *)IObuff, _("Syntax error in %s{...}"), reg_magic == MAGIC_ALL ? "" : "\\"); *** ../vim61b.001/src/version.c Mon Mar 11 21:55:36 2002 --- src/version.c Mon Mar 11 22:00:22 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 2, /**/ -- hundred-and-one symptoms of being an internet addict: 249. You've forgotten what the outside looks like. /// 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 ///