From c141615a7fa632a2435b49f3949ed1fc9962af1f Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Fri, 15 Mar 2013 14:46:19 +0100 Subject: cff-subset: Fix allocation of width arrays fd_default_width and fd_nominal_width are arrays of doubles not arrays of ints. --- src/cairo-cff-subset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cairo-cff-subset.c b/src/cairo-cff-subset.c index bd8d5b5f..c420bd49 100644 --- a/src/cairo-cff-subset.c +++ b/src/cairo-cff-subset.c @@ -1052,13 +1052,13 @@ cairo_cff_font_read_cid_fontdict (cairo_cff_font_t *font, unsigned char *ptr) goto fail; } - font->fd_default_width = calloc (sizeof (int), font->num_fontdicts); + font->fd_default_width = calloc (font->num_fontdicts, sizeof (double)); if (unlikely (font->fd_default_width == NULL)) { status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto fail; } - font->fd_nominal_width = calloc (sizeof (int), font->num_fontdicts); + font->fd_nominal_width = calloc (font->num_fontdicts, sizeof (double)); if (unlikely (font->fd_nominal_width == NULL)) { status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto fail; -- cgit v1.2.3