--- gdk-support.c.~1.24.~ 2003-06-19 11:03:47.000000000 +1000 +++ gdk-support.c 2003-07-07 17:56:13.000000000 +1000 @@ -1122,10 +1122,15 @@ gdk_image_new_bitmap_interp (GdkVisual *visual, guchar data[], int count, gint width, gint height) { + static const char func_name[] = "gdk-image-new-bitmap"; + gpointer m_data; if (count * 8 < width * height) - scm_misc_error ("gdk-image-new-bitmap", "source bitmap is too small", - SCM_EOL); - return gdk_image_new_bitmap (visual, data, width, height); + scm_misc_error (func_name, "source bitmap is too small", SCM_EOL); + m_data = malloc (count); + if (m_data == NULL) + scm_memory_error (func_name); + memcpy (m_data, data, count); + return gdk_image_new_bitmap (visual, m_data, width, height); } GdkBitmap *