Huw Davies : usp10: Don't read past the end of the context_type array.

Alexandre Julliard julliard at winehq.org
Thu Mar 14 14:55:06 CDT 2013


Module: wine
Branch: master
Commit: 28adfd4c3ce5be8194c42b67c8a5fbaddb3ab137
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=28adfd4c3ce5be8194c42b67c8a5fbaddb3ab137

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Mar 14 15:48:26 2013 +0000

usp10: Don't read past the end of the context_type array.

---

 dlls/usp10/shape.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
index d30a615..91637d1 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])
         {




More information about the wine-cvs mailing list