Commit 0ab46cd5 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdi32: Avoid reading past the end of the indices array.

Spotted by Marcus Meissner.
parent 224e51fc
......@@ -192,8 +192,9 @@ static DWORD get_glyph_bitmap( HDC hdc, UINT index, UINT aa_flags, GLYPHMETRICS
indices[0] = index;
for (i = 0; i < sizeof(indices) / sizeof(indices[0]); index = indices[++i])
for (i = 0; i < sizeof(indices) / sizeof(indices[0]); i++)
{
index = indices[i];
ret = GetGlyphOutlineW( hdc, index, ggo_flags, metrics, 0, NULL, &identity );
if (ret != GDI_ERROR) break;
}
......
......@@ -1640,8 +1640,9 @@ static DWORD get_glyph_bitmap( HDC hdc, UINT index, UINT aa_flags,
indices[0] = index;
for (i = 0; i < sizeof(indices) / sizeof(indices[0]); index = indices[++i])
for (i = 0; i < sizeof(indices) / sizeof(indices[0]); i++)
{
index = indices[i];
ret = GetGlyphOutlineW( hdc, index, ggo_flags, metrics, 0, NULL, &identity );
if (ret != GDI_ERROR) break;
}
......
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