pixbuf new_from_xpm_data with too few lines



The program foo.pl below gives a segv for me.  There's not enough lines
in the data for what the header line says and I think
gdk_pixbuf_new_from_xpm_data() goes past the end of the array
Gtk2::Gdk::Pixbuf->new_from_xpm_data builds.  Adding a NULL at the end
keeps it out of trouble, giving either an error or a partial image.
(A NULL like that isn't actually documented as far as I can see, but of
course is pretty logical for an array of strings.)

Attachment: foo.pl
Description: Text Data

Attachment: GdkPixbuf.xs.xpm-lines.diff
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]