Patch 9.0.0189
Problem:    Invalid memory access for text prop without highlight.
Solution:   Check for a valid highlight ID.
Files:      src/highlight.c, src/drawline.c


*** ../vim-9.0.0188/src/highlight.c     2022-07-23 09:52:00.337814264 +0100
--- src/highlight.c     2022-08-10 20:44:41.721792343 +0100
***************
*** 3504,3509 ****
--- 3504,3510 ----
  
  /*
   * Translate a group ID to highlight attributes.
+  * "hl_id" must be valid: > 0, caller must check.
   */
      int
  syn_id2attr(int hl_id)
*** ../vim-9.0.0188/src/drawline.c      2022-08-10 16:48:59.395127789 +0100
--- src/drawline.c      2022-08-10 20:45:36.777757408 +0100
***************
*** 1710,1716 ****
                                                  || text_props[tpi].tp_id < 0)
                                          && text_props[tpi].tp_id != -MAXCOL)
                        {
!                           used_attr = syn_id2attr(pt->pt_hl_id);
                            text_prop_type = pt;
                            text_prop_attr =
                                   hl_combine_attr(text_prop_attr, used_attr);
--- 1710,1717 ----
                                                  || 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 =
                                   hl_combine_attr(text_prop_attr, used_attr);
*** ../vim-9.0.0188/src/version.c       2022-08-10 19:50:44.117894641 +0100
--- src/version.c       2022-08-10 20:49:45.193579915 +0100
***************
*** 737,738 ****
--- 737,740 ----
  {   /* Add new patch number below this line */
+ /**/
+     189,
  /**/

-- 
Facepalm statement #8: "Drive faster, the petrol is running out"

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220810195142.740ED1C4F14%40moolenaar.net.

Raspunde prin e-mail lui