|
Karsten Hopp |
81f527 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
81f527 |
Subject: Patch 7.3.040
|
|
Karsten Hopp |
81f527 |
Fcc: outbox
|
|
Karsten Hopp |
81f527 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
81f527 |
Mime-Version: 1.0
|
|
Karsten Hopp |
81f527 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
81f527 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
81f527 |
------------
|
|
Karsten Hopp |
81f527 |
|
|
Karsten Hopp |
81f527 |
Patch 7.3.040
|
|
Karsten Hopp |
81f527 |
Problem: Comparing strings while ignoring case goes beyond end of the
|
|
Karsten Hopp |
81f527 |
string when there are illegal bytes. (Dominique Pelle)
|
|
Karsten Hopp |
81f527 |
Solution: Explicitly check for illegal bytes.
|
|
Karsten Hopp |
81f527 |
Files: src/mbyte.c
|
|
Karsten Hopp |
81f527 |
|
|
Karsten Hopp |
81f527 |
|
|
Karsten Hopp |
81f527 |
*** ../vim-7.3.039/src/mbyte.c 2010-10-23 14:02:48.000000000 +0200
|
|
Karsten Hopp |
81f527 |
--- src/mbyte.c 2010-10-27 13:34:16.000000000 +0200
|
|
Karsten Hopp |
81f527 |
***************
|
|
Karsten Hopp |
81f527 |
*** 3124,3129 ****
|
|
Karsten Hopp |
81f527 |
--- 3124,3132 ----
|
|
Karsten Hopp |
81f527 |
/* If one of the two characters is incomplete return -1. */
|
|
Karsten Hopp |
81f527 |
if (incomplete || i + utf_byte2len(s2[i]) > n)
|
|
Karsten Hopp |
81f527 |
return -1;
|
|
Karsten Hopp |
81f527 |
+ /* Don't case-fold illegal bytes or truncated characters. */
|
|
Karsten Hopp |
81f527 |
+ if (utf_ptr2len(s1 + i) < l || utf_ptr2len(s2 + i) < l)
|
|
Karsten Hopp |
81f527 |
+ return -1;
|
|
Karsten Hopp |
81f527 |
cdiff = utf_fold(utf_ptr2char(s1 + i))
|
|
Karsten Hopp |
81f527 |
- utf_fold(utf_ptr2char(s2 + i));
|
|
Karsten Hopp |
81f527 |
if (cdiff != 0)
|
|
Karsten Hopp |
81f527 |
*** ../vim-7.3.039/src/version.c 2010-10-27 12:58:19.000000000 +0200
|
|
Karsten Hopp |
81f527 |
--- src/version.c 2010-10-27 13:25:16.000000000 +0200
|
|
Karsten Hopp |
81f527 |
***************
|
|
Karsten Hopp |
81f527 |
*** 716,717 ****
|
|
Karsten Hopp |
81f527 |
--- 716,719 ----
|
|
Karsten Hopp |
81f527 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
81f527 |
+ /**/
|
|
Karsten Hopp |
81f527 |
+ 40,
|
|
Karsten Hopp |
81f527 |
/**/
|
|
Karsten Hopp |
81f527 |
|
|
Karsten Hopp |
81f527 |
--
|
|
Karsten Hopp |
81f527 |
With sufficient thrust, pigs fly just fine.
|
|
Karsten Hopp |
81f527 |
-- RFC 1925
|
|
Karsten Hopp |
81f527 |
|
|
Karsten Hopp |
81f527 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
81f527 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
81f527 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
81f527 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|