diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c
index 19bed04..d41dc88 100644
--- a/gdk/gdkcairo.c
+++ b/gdk/gdkcairo.c
@@ -213,7 +213,7 @@ gdk_cairo_set_source_pixbuf (cairo_t         *cr,
     format = CAIRO_FORMAT_ARGB32;
 
   cairo_stride = cairo_format_stride_for_width (format, width);
-  cairo_pixels = g_malloc (height * cairo_stride);
+  cairo_pixels = g_malloc (height * (gsize)cairo_stride);
   surface = cairo_image_surface_create_for_data ((unsigned char *)cairo_pixels,
                                                  format,
                                                  width, height, cairo_stride);

