forked from aniani/vim
patch 9.0.0189: invalid memory access for text prop without highlight
Problem: Invalid memory access for text prop without highlight. Solution: Check for a valid highlight ID.
This commit is contained in:
@@ -1710,6 +1710,7 @@ win_line(
|
||||
|| text_props[tpi].tp_id < 0)
|
||||
&& text_props[tpi].tp_id != -MAXCOL)
|
||||
{
|
||||
if (pt->pt_hl_id > 0)
|
||||
used_attr = syn_id2attr(pt->pt_hl_id);
|
||||
text_prop_type = pt;
|
||||
text_prop_attr =
|
||||
|
@@ -3504,6 +3504,7 @@ syn_unadd_group(void)
|
||||
|
||||
/*
|
||||
* Translate a group ID to highlight attributes.
|
||||
* "hl_id" must be valid: > 0, caller must check.
|
||||
*/
|
||||
int
|
||||
syn_id2attr(int hl_id)
|
||||
|
@@ -735,6 +735,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
189,
|
||||
/**/
|
||||
188,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user