forked from Mirrors/wine-wine
dwrite: Validate buffer size passed to CreateAlphaTexture() against analysis texture type.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>oldstable
parent
55aedbffa6
commit
0a63390841
|
@ -5092,7 +5092,7 @@ static HRESULT WINAPI glyphrunanalysis_CreateAlphaTexture(IDWriteGlyphRunAnalysi
|
||||||
|
|
||||||
/* make sure buffer is large enough for requested texture type */
|
/* make sure buffer is large enough for requested texture type */
|
||||||
required = (bounds->right - bounds->left) * (bounds->bottom - bounds->top);
|
required = (bounds->right - bounds->left) * (bounds->bottom - bounds->top);
|
||||||
if (type == DWRITE_TEXTURE_CLEARTYPE_3x1)
|
if (This->texture_type == DWRITE_TEXTURE_CLEARTYPE_3x1)
|
||||||
required *= 3;
|
required *= 3;
|
||||||
|
|
||||||
if (size < required)
|
if (size < required)
|
||||||
|
|
Loading…
Reference in New Issue