gdi32: Avoid reading past the end of the indices array.
Spotted by Marcus Meissner.
This commit is contained in:
parent
224e51fcf5
commit
0ab46cd5e9
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue