Skip to content

Resolve GIMP segfault from accessing memory past end of pixbuf

namtsui requested to merge namtsui/gtk:fix-pixbuf-out-of-bounds into gtk-2-24

Fixes #2684 (closed)

GIMP segfaults while switching themes between dark and gray and inputting Ctrl-O to open a file. This is because p advances past end of pixbuf in pixbuf-render.c compute_hint() with num_channels = 3 (no alpha). This is resolved by fixing the if statement to only check for alpha, thereby advancing p, if there is an alpha channel.

Merge request reports