Henri Verbeet : usp10: Use heap_calloc() in ScriptLayout().

Alexandre Julliard julliard at winehq.org
Fri Mar 2 12:16:45 CST 2018


Module: wine
Branch: master
Commit: d6fb80a1105353cfbcb2a771d22cc0f3a248fc76
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d6fb80a1105353cfbcb2a771d22cc0f3a248fc76

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Mar  1 10:04:55 2018 +0330

usp10: Use heap_calloc() in ScriptLayout().

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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 4daba34..f2264a2 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -3755,8 +3755,7 @@ HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *log
     if (!level || (!vistolog && !logtovis))
         return E_INVALIDARG;
 
-    indexs = heap_alloc(sizeof(int) * runs);
-    if (!indexs)
+    if (!(indexs = heap_calloc(runs, sizeof(*indexs))))
         return E_OUTOFMEMORY;
 
     if (vistolog)




More information about the wine-cvs mailing list