mirror of
https://github.com/vim/vim.git
synced 2025-08-25 19:53:53 -04:00
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.harnasi@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
c65643cbec
commit
c43a0614d4
@ -1722,7 +1722,8 @@ mb_decompose(int c, int *c1, int *c2, int *c3)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
*c1 = c;
|
*c1 = c;
|
||||||
*c2 = *c3 = 0;
|
*c2 = 0;
|
||||||
|
*c3 = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -719,6 +719,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1611,
|
||||||
/**/
|
/**/
|
||||||
1610,
|
1610,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user