зеркало из https://github.com/github/putty.git
minibidi: fix read past end of line in rule W5.
The check for a sequence of ET with an EN after it could potentially skip ETs all the way up to the end of the buffer and then look for an EN in the following nonexistent array element. Now it only skips ETs up to count-1, in the same style as the similar check in rule N1. Change-Id: Ifdbae494a22d1b96bf49ae1bcae0efb901565f45
This commit is contained in:
Родитель
e7341d8e97
Коммит
03492ab593
|
@ -1419,7 +1419,7 @@ int do_bidi(bidi_char *line, int count)
|
|||
continue;
|
||||
} else if (i < count-1 && types[i+1] == ET) {
|
||||
j=i;
|
||||
while (j <count && types[j] == ET) {
|
||||
while (j < count-1 && types[j] == ET) {
|
||||
j++;
|
||||
}
|
||||
if (types[j] == EN)
|
||||
|
|
Загрузка…
Ссылка в новой задаче