[PATCH 5/5] usp10: Use heap_calloc() in ScriptLayout().
Aric Stewart
aric at codeweavers.com
Thu Mar 1 14:00:58 CST 2018
Signed-off-by: Aric Stewart <aric at codeweavers.com>
On 3/1/18 12:16 AM, Henri Verbeet wrote:
> Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
> ---
> 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-devel
mailing list