Skip to content

Commit d6a7b3e

Browse files
committed
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.
1 parent dc926dd commit d6a7b3e

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/syntax.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9999,7 +9999,7 @@ highlight_changed(void)
99999999
if (ga_grow(&highlight_ga, 28) == FAIL)
1000010000
return FAIL;
1000110001
hlcnt = highlight_ga.ga_len;
10002-
if (id_S == 0)
10002+
if (id_S == -1)
1000310003
{
1000410004
/* Make sure id_S is always valid to simplify code below. Use the last
1000510005
* entry. */

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
970,
772774
/**/
773775
969,
774776
/**/

0 commit comments

Comments
 (0)