mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
vim-patch:9.1.1611: possible undefined behaviour in mb_decompose() (#35275)
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: vim/vim#17953c43a0614d4
Co-authored-by: Áron Hárnási <aron.harnasi@gmail.com> (cherry picked from commit77500c5ad5
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
bd4b45dd1b
commit
d21db345ef
@@ -1727,7 +1727,8 @@ static void mb_decompose(int c, int *c1, int *c2, int *c3)
|
||||
*c3 = d.c;
|
||||
} else {
|
||||
*c1 = c;
|
||||
*c2 = *c3 = 0;
|
||||
*c2 = 0;
|
||||
*c3 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user