[PATCH 5/5] usp10: Use heap_calloc() in ScriptPlace().
Henri Verbeet
hverbeet at codeweavers.com
Mon Mar 5 01:36:36 CST 2018
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
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];
--
2.1.4
More information about the wine-devel
mailing list