user32: Check bounds before dereferencing.

Signed-off-by: Pierre Schweitzer <pierre@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Pierre Schweitzer 2016-05-01 17:50:18 +02:00 committed by Alexandre Julliard
parent d288d8d333
commit bfb7e167cb

View file

@ -305,7 +305,7 @@ static INT EDIT_WordBreakProc(EDITSTATE *es, LPWSTR s, INT index, INT count, INT
case WB_RIGHT:
if (!count)
break;
while (s[index] && index < count && !es->logAttr[index].fSoftBreak)
while (index < count && s[index] && !es->logAttr[index].fSoftBreak)
index++;
ret = index;
break;