From baaa15837e3b154e3e1ae10ba580b3ba296a41d0 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 5 May 2015 12:23:38 +0200 Subject: Fix typo in fz_pack_path that caused us to malloc much more than needed. --- source/fitz/path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/fitz/path.c b/source/fitz/path.c index 450266a2..6eb38c83 100644 --- a/source/fitz/path.c +++ b/source/fitz/path.c @@ -158,10 +158,10 @@ fz_pack_path(fz_context *ctx, uint8_t *pack_, int max, const fz_path *path) pack->coord_len = path->coord_len; pack->cmd_cap = path->cmd_len; pack->cmd_len = path->cmd_len; - pack->coords = fz_malloc_array(ctx, path->coord_len, sizeof(float) * path->coord_len); + pack->coords = fz_malloc_array(ctx, path->coord_len, sizeof(float)); fz_try(ctx) { - pack->cmds = fz_malloc_array(ctx, path->cmd_len, sizeof(uint8_t) * path->cmd_len); + pack->cmds = fz_malloc_array(ctx, path->cmd_len, sizeof(uint8_t)); } fz_catch(ctx) { -- cgit v1.2.3