To: vim_dev@googlegroups.com Subject: Patch 8.0.0970 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0970 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. Files: src/syntax.c *** ../vim-8.0.0969/src/syntax.c 2017-08-14 22:35:04.668303098 +0200 --- src/syntax.c 2017-08-19 21:32:51.971507014 +0200 *************** *** 9999,10005 **** if (ga_grow(&highlight_ga, 28) == FAIL) return FAIL; hlcnt = highlight_ga.ga_len; ! if (id_S == 0) { /* Make sure id_S is always valid to simplify code below. Use the last * entry. */ --- 9999,10005 ---- if (ga_grow(&highlight_ga, 28) == FAIL) return FAIL; hlcnt = highlight_ga.ga_len; ! if (id_S == -1) { /* Make sure id_S is always valid to simplify code below. Use the last * entry. */ *** ../vim-8.0.0969/src/version.c 2017-08-19 21:26:40.085756031 +0200 --- src/version.c 2017-08-19 21:34:53.926787693 +0200 *************** *** 771,772 **** --- 771,774 ---- { /* Add new patch number below this line */ + /**/ + 970, /**/ -- Team-building exercises come in many forms but they all trace their roots back to the prison system. In your typical team-building exercise the employees are subjected to a variety of unpleasant situations until they become either a cohesive team or a ring of car jackers. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///