[WIN32K] Apply Wine commit 147765a by Sam Edwards: Prevent possible buffer overflows in get_glyph_outline.

svn path=/trunk/; revision=67948
This commit is contained in:
Amine Khaldi
2015-05-29 11:03:17 +00:00
parent 0a619bf67b
commit d0fbb92a57
+3 -3
View File
@@ -2062,8 +2062,8 @@ ftGdiGetGlyphOutline(
case ft_glyph_format_bitmap:
{
BYTE *src = ft_face->glyph->bitmap.buffer, *dst = pvBuf;
INT w = (ft_face->glyph->bitmap.width + 7) >> 3;
INT h = ft_face->glyph->bitmap.rows;
INT w = min( pitch, (ft_face->glyph->bitmap.width + 7) >> 3 );
INT h = min( height, ft_face->glyph->bitmap.rows );
while (h--)
{
RtlCopyMemory(dst, src, w);
@@ -2120,7 +2120,7 @@ ftGdiGetGlyphOutline(
case ft_glyph_format_bitmap:
{
BYTE *src = ft_face->glyph->bitmap.buffer, *dst = pvBuf;
INT h = ft_face->glyph->bitmap.rows;
INT h = min( height, ft_face->glyph->bitmap.rows );
INT x;
while (h--)
{