Nikolay Sivov : dwrite: Fix invalid cluster metrics array index access.
Module: wine Branch: master Commit: 3254a6b2d632050564d7a568963b6f110d68be63 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3254a6b2d632050564d7a56896... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jan 27 15:57:47 2016 +0300 dwrite: Fix invalid cluster metrics array index access. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 0300166..77426e9 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -3264,7 +3264,7 @@ static HRESULT WINAPI dwritetextlayout_DetermineMinWidth(IDWriteTextLayout2 *ifa /* Ignore trailing whitespace clusters, in case of single space range will be reduced to empty range, or [start,start+1). */ - while ((end - 1) >= start && This->clustermetrics[end-1].isWhitespace) + while (end > start && This->clustermetrics[end-1].isWhitespace) end--; /* check if cluster range exceeds last minimal width */
participants (1)
-
Alexandre Julliard