Commit 37845242 authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

usp10: Avoid buffer overrun in ReplaceInsertChars.

parent 64732cca
......@@ -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--)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment