Henri Verbeet : usp10: Use heap_calloc() in ScriptShape().
Alexandre Julliard
julliard at winehq.org
Tue Mar 6 16:48:50 CST 2018
Module: wine
Branch: master
Commit: 315be161ce0ae73775085c1bae6bacdbf3432349
URL: https://source.winehq.org/git/wine.git/?a=commit;h=315be161ce0ae73775085c1bae6bacdbf3432349
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Mar 6 10:26:30 2018 +0330
usp10: Use heap_calloc() in ScriptShape().
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 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 411d19f..983eb83 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -3333,10 +3333,10 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
if (!psva || !pcGlyphs) return E_INVALIDARG;
if (cChars > cMaxGlyphs) return E_OUTOFMEMORY;
- charProps = heap_alloc_zero(sizeof(SCRIPT_CHARPROP)*cChars);
- if (!charProps) return E_OUTOFMEMORY;
- glyphProps = heap_alloc_zero(sizeof(SCRIPT_GLYPHPROP)*cMaxGlyphs);
- if (!glyphProps)
+ if (!(charProps = heap_calloc(cChars, sizeof(*charProps))))
+ return E_OUTOFMEMORY;
+
+ if (!(glyphProps = heap_calloc(cMaxGlyphs, sizeof(*glyphProps))))
{
heap_free(charProps);
return E_OUTOFMEMORY;
More information about the wine-cvs
mailing list