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:
parent
64732ccab4
commit
3784524265
|
@ -1596,7 +1596,7 @@ static void ReplaceInsertChars(HDC hdc, INT cWalk, INT* pcChars, WCHAR *pwOutCha
|
||||||
cWalk=cWalk+1;
|
cWalk=cWalk+1;
|
||||||
|
|
||||||
/* Insert */
|
/* Insert */
|
||||||
for (i = 1; replacements[i] != 0x0000 && i < 3; i++)
|
for (i = 1; i < 3 && replacements[i] != 0x0000; i++)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
for (j = *pcChars; j > cWalk; j--)
|
for (j = *pcChars; j > cWalk; j--)
|
||||||
|
|
Loading…
Reference in New Issue