mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.0.0970: passing invalid highlight id
Problem: if there is no StatusLine highlighting and there is StatusLineNC or StatusLineTermNC highlighting then an invalid highlight id is passed to combine_stl_hlt(). (Coverity) Solution: Check id_S to be -1 instead of zero.
This commit is contained in:
@@ -9999,7 +9999,7 @@ highlight_changed(void)
|
|||||||
if (ga_grow(&highlight_ga, 28) == FAIL)
|
if (ga_grow(&highlight_ga, 28) == FAIL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
hlcnt = highlight_ga.ga_len;
|
hlcnt = highlight_ga.ga_len;
|
||||||
if (id_S == 0)
|
if (id_S == -1)
|
||||||
{
|
{
|
||||||
/* Make sure id_S is always valid to simplify code below. Use the last
|
/* Make sure id_S is always valid to simplify code below. Use the last
|
||||||
* entry. */
|
* entry. */
|
||||||
|
@@ -769,6 +769,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 */
|
||||||
|
/**/
|
||||||
|
970,
|
||||||
/**/
|
/**/
|
||||||
969,
|
969,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user