comparison src/highlight.c @ 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 827d9f2b7a71
children 74b522939a3d
comparison
equal deleted inserted replaced
29697:0089ec4231af 29698:b944b7fb563b
3502 vim_free(HL_TABLE()[highlight_ga.ga_len].sg_name_u); 3502 vim_free(HL_TABLE()[highlight_ga.ga_len].sg_name_u);
3503 } 3503 }
3504 3504
3505 /* 3505 /*
3506 * Translate a group ID to highlight attributes. 3506 * Translate a group ID to highlight attributes.
3507 * "hl_id" must be valid: > 0, caller must check.
3507 */ 3508 */
3508 int 3509 int
3509 syn_id2attr(int hl_id) 3510 syn_id2attr(int hl_id)
3510 { 3511 {
3511 int attr; 3512 int attr;