From d6a7b3e6bbb8f87507de68d86cf70eab806aab3a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 19 Aug 2017 21:35:35 +0200 Subject: 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. --- src/syntax.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/syntax.c b/src/syntax.c index 637a45012..730357520 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -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. */ diff --git a/src/version.c b/src/version.c index c1260ec87..d820595b5 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 970, /**/ 969, /**/ -- cgit v1.2.1