forked from aniani/vim
patch 7.4.736
Problem: Invalid memory access. Solution: Avoid going over the end of a NUL terminated string. (Dominique Pelle)
This commit is contained in:
@@ -1157,7 +1157,7 @@ get_coll_element(pp)
|
|||||||
int l = 1;
|
int l = 1;
|
||||||
char_u *p = *pp;
|
char_u *p = *pp;
|
||||||
|
|
||||||
if (p[1] == '.')
|
if (p[0] != NUL && p[1] == '.')
|
||||||
{
|
{
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
if (has_mbyte)
|
if (has_mbyte)
|
||||||
@@ -1228,8 +1228,9 @@ skip_anyof(p)
|
|||||||
{
|
{
|
||||||
if (get_char_class(&p) == CLASS_NONE
|
if (get_char_class(&p) == CLASS_NONE
|
||||||
&& get_equi_class(&p) == 0
|
&& get_equi_class(&p) == 0
|
||||||
&& get_coll_element(&p) == 0)
|
&& get_coll_element(&p) == 0
|
||||||
++p; /* It was not a class name */
|
&& *p != NUL)
|
||||||
|
++p; /* it is not a class name and not NUL */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
++p;
|
++p;
|
||||||
@@ -3156,7 +3157,7 @@ peekchr()
|
|||||||
/*
|
/*
|
||||||
* META contains everything that may be magic sometimes,
|
* META contains everything that may be magic sometimes,
|
||||||
* except ^ and $ ("\^" and "\$" are only magic after
|
* except ^ and $ ("\^" and "\$" are only magic after
|
||||||
* "\v"). We now fetch the next character and toggle its
|
* "\V"). We now fetch the next character and toggle its
|
||||||
* magicness. Therefore, \ is so meta-magic that it is
|
* magicness. Therefore, \ is so meta-magic that it is
|
||||||
* not in META.
|
* not in META.
|
||||||
*/
|
*/
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
736,
|
||||||
/**/
|
/**/
|
||||||
735,
|
735,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user