diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-28 21:38:00 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-28 21:38:00 +0200 |
commit | d74af4227b4e961bbab6ec9aa36512464434a1ad (patch) | |
tree | 979ee5dfa85fc0390d5a7fe3538872c404e5d1a3 /src/screen.c | |
parent | 711d02c96da996e3423a6518909687e1d45ce45a (diff) | |
download | vim-git-d74af4227b4e961bbab6ec9aa36512464434a1ad.tar.gz |
patch 8.1.1603: crash when using unknown highlighting in text propertyv8.1.1603
Problem: Crash when using unknown highlighting in text property.
Solution: Check for zero highlight ID.
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/screen.c b/src/screen.c index 5136c1301..4c3ded2ca 100644 --- a/src/screen.c +++ b/src/screen.c @@ -3171,7 +3171,7 @@ win_line( int row; /* row in the window, excl w_winrow */ int screen_row; /* row on the screen, incl w_winrow */ - char_u extra[18]; /* "%ld" and 'fdc' must fit in here */ + char_u extra[20]; /* "%ld" and 'fdc' must fit in here */ int n_extra = 0; /* number of extra chars */ char_u *p_extra = NULL; /* string of extra chars, plus NUL */ char_u *p_extra_free = NULL; /* p_extra needs to be freed */ @@ -4440,7 +4440,7 @@ win_line( proptype_T *pt = text_prop_type_by_id( wp->w_buffer, text_props[tpi].tp_type); - if (pt != NULL) + if (pt != NULL && pt->pt_hl_id > 0) { int pt_attr = syn_id2attr(pt->pt_hl_id); |