mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
vim-patch:7.4.714
Problem: Illegal memory access when there are illegal bytes.
Solution: Check the byte length of the character. (Dominique Pelle)
069dd08d8d
This commit is contained in:
@@ -5333,10 +5333,12 @@ do_class:
|
|||||||
if ((len = (*mb_ptr2len)(opnd)) > 1) {
|
if ((len = (*mb_ptr2len)(opnd)) > 1) {
|
||||||
if (ireg_ic && enc_utf8)
|
if (ireg_ic && enc_utf8)
|
||||||
cf = utf_fold(utf_ptr2char(opnd));
|
cf = utf_fold(utf_ptr2char(opnd));
|
||||||
while (count < maxcount) {
|
while (count < maxcount && (*mb_ptr2len)(scan) >= len) {
|
||||||
for (i = 0; i < len; ++i)
|
for (i = 0; i < len; ++i) {
|
||||||
if (opnd[i] != scan[i])
|
if (opnd[i] != scan[i]) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (i < len && (!ireg_ic || !enc_utf8
|
if (i < len && (!ireg_ic || !enc_utf8
|
||||||
|| utf_fold(utf_ptr2char(scan)) != cf))
|
|| utf_fold(utf_ptr2char(scan)) != cf))
|
||||||
break;
|
break;
|
||||||
|
@@ -410,7 +410,7 @@ static int included_patches[] = {
|
|||||||
// 717,
|
// 717,
|
||||||
// 716,
|
// 716,
|
||||||
// 715,
|
// 715,
|
||||||
// 714,
|
714,
|
||||||
713,
|
713,
|
||||||
712,
|
712,
|
||||||
711,
|
711,
|
||||||
|
Reference in New Issue
Block a user