Commit 53ec9b32 authored by Sam Edwards's avatar Sam Edwards Committed by Alexandre Julliard

gdi32: Prevent another possible buffer overflow in get_glyph_outline.

parent a180e5ed
...@@ -6362,9 +6362,10 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format, ...@@ -6362,9 +6362,10 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
y_shift = height - (src_height / vmul); y_shift = height - (src_height / vmul);
dst += x_shift + y_shift * ( pitch / 4 ); dst += x_shift + y_shift * ( pitch / 4 );
while ( src_height ) height = min( height, src_height / vmul );
while ( height-- )
{ {
for ( x = 0; x < src_width / hmul; x++ ) for ( x = 0; x < width && x < src_width / hmul; x++ )
{ {
if ( rgb ) if ( rgb )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment