mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.736 #2998
Problem: Invalid memory access. Solution: Avoid going over the end of a NUL terminated string. (Dominique Pelle) https://github.com/vim/vim/commit/v7-4-736
This commit is contained in:
parent
366aa8c196
commit
c80ebfff82
@ -1104,7 +1104,7 @@ static int get_coll_element(char_u **pp)
|
|||||||
int l = 1;
|
int l = 1;
|
||||||
char_u *p = *pp;
|
char_u *p = *pp;
|
||||||
|
|
||||||
if (p[1] == '.') {
|
if (p[0] != NUL && p[1] == '.') {
|
||||||
if (has_mbyte)
|
if (has_mbyte)
|
||||||
l = (*mb_ptr2len)(p + 2);
|
l = (*mb_ptr2len)(p + 2);
|
||||||
if (p[l + 2] == '.' && p[l + 3] == ']') {
|
if (p[l + 2] == '.' && p[l + 3] == ']') {
|
||||||
@ -1156,8 +1156,9 @@ static char_u *skip_anyof(char_u *p)
|
|||||||
else if (*p == '[') {
|
else if (*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;
|
||||||
}
|
}
|
||||||
@ -2848,7 +2849,7 @@ static int peekchr(void)
|
|||||||
/*
|
/*
|
||||||
* 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.
|
||||||
*/
|
*/
|
||||||
|
@ -71,9 +71,49 @@ static char *features[] = {
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static int included_patches[] = {
|
static int included_patches[] = {
|
||||||
|
//778,
|
||||||
|
//777,
|
||||||
|
//776,
|
||||||
|
//775,
|
||||||
|
//774,
|
||||||
|
//773,
|
||||||
|
//772,
|
||||||
|
//771,
|
||||||
|
//770,
|
||||||
|
//769,
|
||||||
|
//768,
|
||||||
|
//767,
|
||||||
|
//766,
|
||||||
|
//765,
|
||||||
|
//764,
|
||||||
|
//763,
|
||||||
|
//762,
|
||||||
|
//761,
|
||||||
|
//760,
|
||||||
|
//759,
|
||||||
|
//758,
|
||||||
|
//757,
|
||||||
|
//756,
|
||||||
|
//755,
|
||||||
|
//754,
|
||||||
|
//753,
|
||||||
|
//752,
|
||||||
|
//751,
|
||||||
|
//750,
|
||||||
|
//749,
|
||||||
|
//748,
|
||||||
|
//747,
|
||||||
|
//746,
|
||||||
|
//745,
|
||||||
|
//744,
|
||||||
|
//743,
|
||||||
|
//742,
|
||||||
|
//741,
|
||||||
|
//740,
|
||||||
|
//739,
|
||||||
//738 NA
|
//738 NA
|
||||||
//737,
|
//737,
|
||||||
//736,
|
736,
|
||||||
//735,
|
//735,
|
||||||
//734,
|
//734,
|
||||||
//733,
|
//733,
|
||||||
|
Loading…
Reference in New Issue
Block a user