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:
Simon Tatham 2019-02-09 14:12:16 +00:00
Родитель e7341d8e97
Коммит 03492ab593
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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)