Huw Davies : gdi32: Don' t overrun the current scanline while copying a glyph's bitmap.
Alexandre Julliard
julliard at winehq.org
Tue Apr 8 06:38:28 CDT 2008
Module: wine
Branch: master
Commit: a643337c266c64bd55ec32bed74703409a629a51
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a643337c266c64bd55ec32bed74703409a629a51
Author: Huw Davies <huw at codeweavers.com>
Date: Tue Apr 8 12:19:31 2008 +0100
gdi32: Don't overrun the current scanline while copying a glyph's bitmap.
---
dlls/gdi32/freetype.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index b00bc71..aeb9c7d 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -4384,7 +4384,12 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
INT x;
while(h--) {
for(x = 0; x < pitch; x++)
- dst[x] = (src[x / 8] & (1 << ( (7 - (x % 8))))) ? 0xff : 0;
+ {
+ if(x < ft_face->glyph->bitmap.width)
+ dst[x] = (src[x / 8] & (1 << ( (7 - (x % 8))))) ? 0xff : 0;
+ else
+ dst[x] = 0;
+ }
src += ft_face->glyph->bitmap.pitch;
dst += pitch;
}
More information about the wine-cvs
mailing list