Nikolay Sivov : dwrite: Fix invalid cluster metrics array index access.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jan 27 11:27:21 CST 2016
Module: wine
Branch: master
Commit: 3254a6b2d632050564d7a568963b6f110d68be63
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3254a6b2d632050564d7a568963b6f110d68be63
Author: Nikolay Sivov <nsivov at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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 */
More information about the wine-cvs
mailing list