To: vim_dev@googlegroups.com
Subject: Patch 7.4.736
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.4.736
Problem: Invalid memory access.
Solution: Avoid going over the end of a NUL terminated string. (Dominique
Pelle)
Files: src/regexp.c
*** ../vim-7.4.735/src/regexp.c 2015-05-04 09:56:41.878096054 +0200
--- src/regexp.c 2015-06-09 20:37:13.615725284 +0200
***************
*** 1157,1163 ****
int l = 1;
char_u *p = *pp;
! if (p[1] == '.')
{
#ifdef FEAT_MBYTE
if (has_mbyte)
--- 1157,1163 ----
int l = 1;
char_u *p = *pp;
! if (p[0] != NUL && p[1] == '.')
{
#ifdef FEAT_MBYTE
if (has_mbyte)
***************
*** 1228,1235 ****
{
if (get_char_class(&p) == CLASS_NONE
&& get_equi_class(&p) == 0
! && get_coll_element(&p) == 0)
! ++p; /* It was not a class name */
}
else
++p;
--- 1228,1236 ----
{
if (get_char_class(&p) == CLASS_NONE
&& get_equi_class(&p) == 0
! && get_coll_element(&p) == 0
! && *p != NUL)
! ++p; /* it is not a class name and not NUL */
}
else
++p;
***************
*** 3156,3162 ****
/*
* META contains everything that may be magic sometimes,
* except ^ and $ ("\^" and "\$" are only magic after
! * "\v"). We now fetch the next character and toggle its
* magicness. Therefore, \ is so meta-magic that it is
* not in META.
*/
--- 3157,3163 ----
/*
* META contains everything that may be magic sometimes,
* except ^ and $ ("\^" and "\$" are only magic after
! * "\V"). We now fetch the next character and toggle its
* magicness. Therefore, \ is so meta-magic that it is
* not in META.
*/
*** ../vim-7.4.735/src/version.c 2015-06-09 20:30:45.495855617 +0200
--- src/version.c 2015-06-09 20:35:05.465090115 +0200
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 736,
/**/
--
From "know your smileys":
2B|^2B Message from Shakespeare
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///