Henri Verbeet : usp10: Use heap_calloc() in ScriptPlace().
Alexandre Julliard
julliard at winehq.org
Mon Mar 5 16:14:32 CST 2018
Module: wine
Branch: master
Commit: 9be6ff403dedfafc32cc387466745f5414068e88
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9be6ff403dedfafc32cc387466745f5414068e88
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Mar 5 11:24:36 2018 +0330
usp10: Use heap_calloc() in ScriptPlace().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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];
More information about the wine-cvs
mailing list