From 28adfd4c3ce5be8194c42b67c8a5fbaddb3ab137 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Thu, 14 Mar 2013 15:48:26 +0000 Subject: [PATCH] usp10: Don't read past the end of the context_type array. --- dlls/usp10/shape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index d30a615e597..91637d1966c 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -931,7 +931,7 @@ static void mark_invalid_combinations(HDC hdc, const WCHAR* pwcChars, INT cChars context_type[i] = lex(pwcChars[i]); GetGlyphIndicesW(hdc, &invalid, 1, &invalid_glyph, 0); - for (i = 1, g=1; i < cChars; i++, g++) + for (i = 1, g=1; i < cChars - 1; i++, g++) { if (context_type[i] != 0 && context_type[i+write_dir]==context_type[i]) {