patch 9.2.0528: possible overflow in XIM resource handling

Commit: 
https://github.com/vim/vim/commit/31c739458acc397ea3684d4504e6036846f2a708
Author: Christian Brabandt <[email protected]>
Date:   Sun May 24 16:47:27 2026 +0000

    patch 9.2.0528: possible overflow in XIM resource handling
    
    Problem:  possible overflow in XIM resource handling
              (Venukamatchi)
    Solution: use vim_strncpy() with the buffer size
    
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/gui_xim.c b/src/gui_xim.c
index ec4620f38..a04667e2d 100644
--- a/src/gui_xim.c
+++ b/src/gui_xim.c
@@ -1750,7 +1750,8 @@ xim_real_init(Window x11_window, Display *x11_display)
 
     if (gui.rsrc_input_method != NULL && *gui.rsrc_input_method != NUL)
     {
-       strcpy(tmp, gui.rsrc_input_method);
+       vim_strncpy((char_u *)tmp, (char_u *)gui.rsrc_input_method,
+           sizeof(tmp) - 1);
        for (ns = s = tmp; ns != NULL && *s != NUL;)
        {
            s = (char *)skipwhite((char_u *)s);
@@ -1817,7 +1818,8 @@ xim_real_init(Window x11_window, Display *x11_display)
     }
 
     found = False;
-    strcpy(tmp, gui.rsrc_preedit_type_name);
+    vim_strncpy((char_u *)tmp, (char_u *)gui.rsrc_preedit_type_name,
+           sizeof(tmp) - 1);
     for (s = tmp; s && !found; )
     {
        while (*s && SAFE_isspace(*s))
diff --git a/src/version.c b/src/version.c
index 708cd1746..19dbebbdb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    528,
 /**/
     527,
 /**/

-- 
-- 
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/E1wRCBI-004MFF-6P%40256bit.org.

Raspunde prin e-mail lui