Permalink
Browse files

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.
  • Loading branch information...
brammool committed Aug 19, 2017
1 parent dc926dd commit d6a7b3e6bbb8f87507de68d86cf70eab806aab3a
Showing with 3 additions and 1 deletion.
  1. +1 −1 src/syntax.c
  2. +2 −0 src/version.c
View
@@ -9999,7 +9999,7 @@ highlight_changed(void)
if (ga_grow(&highlight_ga, 28) == FAIL)
return FAIL;
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
* entry. */
View
@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
970,
/**/
969,
/**/

0 comments on commit d6a7b3e

Please sign in to comment.