forked from aniani/vim
patch 8.2.2374: accessing uninitialized memory in test_undo
Problem: Accessing uninitialized memory in test_undo. Solution: Do not look in typebuf.tb_buf if it is empty. (Dominique Pellé, closes #7697)
This commit is contained in:
parent
f30a14db3b
commit
82aa6e09e0
@ -1586,7 +1586,7 @@ decodeModifyOtherKeys(int c)
|
|||||||
// Recognize:
|
// Recognize:
|
||||||
// form 0: {lead}{key};{modifier}u
|
// form 0: {lead}{key};{modifier}u
|
||||||
// form 1: {lead}27;{modifier};{key}~
|
// form 1: {lead}27;{modifier};{key}~
|
||||||
if ((c == CSI || (c == ESC && *p == '[')) && typebuf.tb_len >= 4)
|
if (typebuf.tb_len >= 4 && (c == CSI || (c == ESC && *p == '[')))
|
||||||
{
|
{
|
||||||
idx = (*p == '[');
|
idx = (*p == '[');
|
||||||
if (p[idx] == '2' && p[idx + 1] == '7' && p[idx + 2] == ';')
|
if (p[idx] == '2' && p[idx + 1] == '7' && p[idx + 2] == ';')
|
||||||
|
@ -750,6 +750,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 */
|
||||||
|
/**/
|
||||||
|
2374,
|
||||||
/**/
|
/**/
|
||||||
2373,
|
2373,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user