diff options
author | Marek Kasik <mkasik@redhat.com> | 2013-03-15 14:46:19 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-03-15 14:01:53 +0000 |
commit | c141615a7fa632a2435b49f3949ed1fc9962af1f (patch) | |
tree | 424c8673a37029fb7ae2942e74a96af1865b8f7c | |
parent | 01a8bf01c6508a4fea8d40371c3049e7a2f7908a (diff) |
cff-subset: Fix allocation of width arrays
fd_default_width and fd_nominal_width
are arrays of doubles not arrays of ints.
-rw-r--r-- | src/cairo-cff-subset.c | 4 |
1 files 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; |