diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 3262163fb..38a4a8dc5 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -840,7 +840,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap, width_rgba = width; stride = bitmap->pitch; stride_rgba = (width_rgba * 4 + 3) & ~3; - data_rgba = calloc (1, stride_rgba * height); + data_rgba = calloc (stride_rgba, height); if (data_rgba == NULL) { if (own_buffer) free (bitmap->buffer); @@ -1041,7 +1041,7 @@ _render_glyph_outline (FT_Face face, bitmap.pitch = stride; bitmap.width = width * hmul; bitmap.rows = height * vmul; - bitmap.buffer = calloc (1, stride * bitmap.rows); + bitmap.buffer = calloc (stride, bitmap.rows); if (bitmap.buffer == NULL) { _cairo_error (CAIRO_STATUS_NO_MEMORY); diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c index 8f497a9cc..4b0e74b2d 100644 --- a/src/cairo-glitz-surface.c +++ b/src/cairo-glitz-surface.c @@ -1347,7 +1347,7 @@ _cairo_glitz_surface_composite_trapezoids (cairo_operator_t op, int stride; stride = (width + 3) & -4; - data = calloc (stride * height, 1); + data = calloc (stride, height); if (!data) { _cairo_glitz_pattern_release_surface (src_pattern, src, &attributes); diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 645932928..9fbdb59a3 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -1198,7 +1198,7 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t op, } /* The image must be initially transparent */ - mask_data = calloc (1, mask_stride * height); + mask_data = calloc (mask_stride, height); if (mask_data == NULL) { status = CAIRO_STATUS_NO_MEMORY; goto CLEANUP_SOURCE;