[cairo-commit] src/cairo-cff-subset.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Mar 15 07:02:13 PDT 2013


 src/cairo-cff-subset.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c141615a7fa632a2435b49f3949ed1fc9962af1f
Author: Marek Kasik <mkasik at redhat.com>
Date:   Fri Mar 15 14:46:19 2013 +0100

    cff-subset: Fix allocation of width arrays
    
    fd_default_width and fd_nominal_width
    are arrays of doubles not arrays of ints.

diff --git a/src/cairo-cff-subset.c b/src/cairo-cff-subset.c
index bd8d5b5..c420bd4 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;


More information about the cairo-commit mailing list