--- gambas3-3.8.4/gb.gtk/src/gtools.cpp.orig 2016-02-12 15:16:14.351635764 -0500 +++ gambas3-3.8.4/gb.gtk/src/gtools.cpp 2016-02-12 15:17:00.881908971 -0500 @@ -1853,7 +1853,7 @@ cairo_surface_t *gt_cairo_create_surface format = CAIRO_FORMAT_ARGB32; cairo_stride = cairo_format_stride_for_width (format, width); - cairo_pixels = (uchar *)g_malloc (height * cairo_stride); + cairo_pixels = (uchar *)g_malloc_n (height, cairo_stride); surface = cairo_image_surface_create_for_data ((unsigned char *)cairo_pixels, format, width, height, cairo_stride);