patch 9.2.0113: winhighlight pointer may be used uninitialized

Commit: 
https://github.com/vim/vim/commit/9c4cb7145fc437c1f31c94767d72e15fd60f0b25
Author: Foxe Chen <[email protected]>
Date:   Thu Mar 5 20:50:24 2026 +0000

    patch 9.2.0113: winhighlight pointer may be used uninitialized
    
    Problem:  winhighlight pointer may be used uninitialized causing a crash
    Solution: Initialize pointer in win_init() and win_init_empty()
              (Foxe Chen).
    
    closes: #19601
    
    Signed-off-by: Foxe Chen <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/version.c b/src/version.c
index 6beefa483..3cddb4bc0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    113,
 /**/
     112,
 /**/
diff --git a/src/window.c b/src/window.c
index defcc70e6..c078ed9ac 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1565,6 +1565,7 @@ win_init(win_T *newp, win_T *oldp, int flags UNUSED)
     newp->w_wrow = oldp->w_wrow;
     newp->w_fraction = oldp->w_fraction;
     newp->w_prev_fraction_row = oldp->w_prev_fraction_row;
+    newp->w_hl = NULL;
     copy_jumplist(oldp, newp);
 #ifdef FEAT_QUICKFIX
     if (flags & WSP_NEWLOC)
@@ -2521,6 +2522,7 @@ win_init_empty(win_T *wp)
     wp->w_prev_pcmark.lnum = 0;
     wp->w_prev_pcmark.col = 0;
     wp->w_topline = 1;
+    wp->w_hl = NULL;
 #ifdef FEAT_DIFF
     wp->w_topfill = 0;
 #endif

-- 
-- 
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 visit 
https://groups.google.com/d/msgid/vim_dev/E1vyoDZ-00B1jb-O4%40256bit.org.

Raspunde prin e-mail lui