1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Comparing strings while ignoring case goes beyond end of the
12 string when there are illegal bytes. (Dominique Pelle)
13 Solution: Explicitly check for illegal bytes.
17 *** ../vim-7.3.039/src/mbyte.c 2010-10-23 14:02:48.000000000 +0200
18 --- src/mbyte.c 2010-10-27 13:34:16.000000000 +0200
22 /* If one of the two characters is incomplete return -1. */
23 if (incomplete || i + utf_byte2len(s2[i]) > n)
25 + /* Don't case-fold illegal bytes or truncated characters. */
26 + if (utf_ptr2len(s1 + i) < l || utf_ptr2len(s2 + i) < l)
28 cdiff = utf_fold(utf_ptr2char(s1 + i))
29 - utf_fold(utf_ptr2char(s2 + i));
31 *** ../vim-7.3.039/src/version.c 2010-10-27 12:58:19.000000000 +0200
32 --- src/version.c 2010-10-27 13:25:16.000000000 +0200
36 { /* Add new patch number below this line */
42 With sufficient thrust, pigs fly just fine.
45 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
46 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
47 \\\ download, build and distribute -- http://www.A-A-P.org ///
48 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///