|
Karsten Hopp |
69d3f9 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
69d3f9 |
Subject: Patch 7.4.685
|
|
Karsten Hopp |
69d3f9 |
Fcc: outbox
|
|
Karsten Hopp |
69d3f9 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
69d3f9 |
Mime-Version: 1.0
|
|
Karsten Hopp |
69d3f9 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
69d3f9 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
69d3f9 |
------------
|
|
Karsten Hopp |
69d3f9 |
|
|
Karsten Hopp |
69d3f9 |
Patch 7.4.685
|
|
Karsten Hopp |
69d3f9 |
Problem: When there are illegal utf-8 characters the old regexp engine may
|
|
Karsten Hopp |
69d3f9 |
go past the end of a string.
|
|
Karsten Hopp |
69d3f9 |
Solution: Only advance to the end of the string. (Dominique Pelle)
|
|
Karsten Hopp |
69d3f9 |
Files: src/regexp.c
|
|
Karsten Hopp |
69d3f9 |
|
|
Karsten Hopp |
69d3f9 |
|
|
Karsten Hopp |
69d3f9 |
*** ../vim-7.4.684/src/regexp.c 2015-01-27 12:59:51.859602392 +0100
|
|
Karsten Hopp |
69d3f9 |
--- src/regexp.c 2015-03-31 14:12:00.708075265 +0200
|
|
Karsten Hopp |
69d3f9 |
***************
|
|
Karsten Hopp |
69d3f9 |
*** 4782,4788 ****
|
|
Karsten Hopp |
69d3f9 |
/* When only a composing char is given match at any
|
|
Karsten Hopp |
69d3f9 |
* position where that composing char appears. */
|
|
Karsten Hopp |
69d3f9 |
status = RA_NOMATCH;
|
|
Karsten Hopp |
69d3f9 |
! for (i = 0; reginput[i] != NUL; i += utf_char2len(inpc))
|
|
Karsten Hopp |
69d3f9 |
{
|
|
Karsten Hopp |
69d3f9 |
inpc = mb_ptr2char(reginput + i);
|
|
Karsten Hopp |
69d3f9 |
if (!utf_iscomposing(inpc))
|
|
Karsten Hopp |
69d3f9 |
--- 4782,4789 ----
|
|
Karsten Hopp |
69d3f9 |
/* When only a composing char is given match at any
|
|
Karsten Hopp |
69d3f9 |
* position where that composing char appears. */
|
|
Karsten Hopp |
69d3f9 |
status = RA_NOMATCH;
|
|
Karsten Hopp |
69d3f9 |
! for (i = 0; reginput[i] != NUL;
|
|
Karsten Hopp |
69d3f9 |
! i += utf_ptr2len(reginput + i))
|
|
Karsten Hopp |
69d3f9 |
{
|
|
Karsten Hopp |
69d3f9 |
inpc = mb_ptr2char(reginput + i);
|
|
Karsten Hopp |
69d3f9 |
if (!utf_iscomposing(inpc))
|
|
Karsten Hopp |
69d3f9 |
*** ../vim-7.4.684/src/version.c 2015-03-31 13:33:00.801524871 +0200
|
|
Karsten Hopp |
69d3f9 |
--- src/version.c 2015-03-31 13:58:19.868991369 +0200
|
|
Karsten Hopp |
69d3f9 |
***************
|
|
Karsten Hopp |
69d3f9 |
*** 743,744 ****
|
|
Karsten Hopp |
69d3f9 |
--- 743,746 ----
|
|
Karsten Hopp |
69d3f9 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
69d3f9 |
+ /**/
|
|
Karsten Hopp |
69d3f9 |
+ 685,
|
|
Karsten Hopp |
69d3f9 |
/**/
|
|
Karsten Hopp |
69d3f9 |
|
|
Karsten Hopp |
69d3f9 |
--
|
|
Karsten Hopp |
69d3f9 |
The Law, in its majestic equality, forbids the rich, as well as the
|
|
Karsten Hopp |
69d3f9 |
poor, to sleep under the bridges, to beg in the streets, and to steal
|
|
Karsten Hopp |
69d3f9 |
bread. -- Anatole France
|
|
Karsten Hopp |
69d3f9 |
|
|
Karsten Hopp |
69d3f9 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
69d3f9 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
69d3f9 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
69d3f9 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|