patch 9.1.1611: possible undefined behaviour in mb_decompose()

Commit: 
https://github.com/vim/vim/commit/c43a0614d40a3892a9cb2b9d75f61a19a3de0226
Author: Áron Hárnási <aron.harn...@gmail.com>
Date:   Sat Aug 9 23:43:13 2025 +0200

    patch 9.1.1611: possible undefined behaviour in mb_decompose()
    
    Problem:  possible undefined behaviour in mb_decompose(), when using the
              same pointer as argument several times
    Solution: use separate assignments to avoid reading and writing the same
              object at the same time (Áron Hárnási)
    
    closes: #17953
    
    Signed-off-by: Áron Hárnási <aron.harn...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/regexp.c b/src/regexp.c
index e37dd3c5b..305ca896e 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -1722,7 +1722,8 @@ mb_decompose(int c, int *c1, int *c2, int *c3)
     else
     {
        *c1 = c;
-       *c2 = *c3 = 0;
+       *c2 = 0;
+       *c3 = 0;
     }
 }
 
diff --git a/src/version.c b/src/version.c
index e2c46855e..4716c5d0d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1611,
 /**/
     1610,
 /**/

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1ukrbh-005CWN-U3%40256bit.org.

Raspunde prin e-mail lui