usp10: Avoid buffer overrun in ReplaceInsertChars.

Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Thomas Faber 2016-06-26 10:57:50 +02:00 committed by Alexandre Julliard
parent 64732ccab4
commit 3784524265
1 changed files with 1 additions and 1 deletions

View File

@ -1596,7 +1596,7 @@ static void ReplaceInsertChars(HDC hdc, INT cWalk, INT* pcChars, WCHAR *pwOutCha
cWalk=cWalk+1;
/* Insert */
for (i = 1; replacements[i] != 0x0000 && i < 3; i++)
for (i = 1; i < 3 && replacements[i] != 0x0000; i++)
{
int j;
for (j = *pcChars; j > cWalk; j--)