Module: wine Branch: master Commit: 9be6ff403dedfafc32cc387466745f5414068e88 URL: https://source.winehq.org/git/wine.git/?a=commit;h=9be6ff403dedfafc32cc38746...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Mar 5 11:24:36 2018 +0330
usp10: Use heap_calloc() in ScriptPlace().
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Aric Stewart aric@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/usp10/usp10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 103b345..411d19f 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -3501,8 +3501,8 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, if (!psva) return E_INVALIDARG; if (!pGoffset) return E_FAIL;
- glyphProps = heap_alloc(sizeof(SCRIPT_GLYPHPROP)*cGlyphs); - if (!glyphProps) return E_OUTOFMEMORY; + if (!(glyphProps = heap_calloc(cGlyphs, sizeof(*glyphProps)))) + return E_OUTOFMEMORY;
for (i = 0; i < cGlyphs; i++) glyphProps[i].sva = psva[i];