Mercurial > vim
changeset 29698:b944b7fb563b v9.0.0189
patch 9.0.0189: invalid memory access for text prop without highlight
Commit: https://github.com/vim/vim/commit/87f3a2ca3d0ffbfa7389bbb89add4d8d3fca6fbb
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 10 20:50:23 2022 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 10 Aug 2022 22:00:03 +0200 |
parents | 0089ec4231af |
children | 8d53de231a4d |
files | src/drawline.c src/highlight.c src/version.c |
diffstat | 3 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/drawline.c +++ b/src/drawline.c @@ -1710,7 +1710,8 @@ win_line( || text_props[tpi].tp_id < 0) && text_props[tpi].tp_id != -MAXCOL) { - used_attr = syn_id2attr(pt->pt_hl_id); + if (pt->pt_hl_id > 0) + used_attr = syn_id2attr(pt->pt_hl_id); text_prop_type = pt; text_prop_attr = hl_combine_attr(text_prop_attr, used_attr);