GNOME Bugzilla – Bug 543085
gdk_pixbuf_saturate_and_pixelate may corrupt memory
Last modified: 2010-07-10 04:06:36 UTC
When called with "saturation" = 1.0 and "pixelate" = FALSE, gdk_pixbuf_saturate_and_pixelate copies the contents of "src" to "dest" with memcpy (taking into account that the format, dimensions and rowstride values of the images are the same). However images that do not occupy a contiguous memory block can not be copied in this way. Subpixbuf is a significant example of this case. A subpixbuf is a part of another image. When an image is copied into a subpixbuf via memcpy, not only the subpixbuf changes. The image surrounding the subpixbuf is changed too. The detailed bug description can be found at: http://linuxtesting.org/results/report?num=S0640
Nice catch. * gdk-pixbuf-utils.c (gdk_pixbuf_saturate_and_pixelate): Use gdk_pixbuf_copy_area() to copy between pixbufs. Reported by Andrey Tsyvarev