Module: wine Branch: master Commit: 0a633908410f8ecd815ab8c897768a0dfad1028e URL: http://source.winehq.org/git/wine.git/?a=commit;h=0a633908410f8ecd815ab8c897...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Tue Sep 5 13:35:28 2017 +0300
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
---
dlls/dwrite/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 4dfb47f..9af46be 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -5092,7 +5092,7 @@ static HRESULT WINAPI glyphrunanalysis_CreateAlphaTexture(IDWriteGlyphRunAnalysi
/* make sure buffer is large enough for requested texture type */ 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;
if (size < required)