GNOME Bugzilla – Bug 734556
Fedora 20 (GNOME 3.12) crashes on malformed PNG file
Last modified: 2015-09-15 12:06:31 UTC
First noticed this when navigating through homedir on Nautilus and having Nautilus crash. Ran the core dump through gdb and noted that it was crashing each time trying to draw a specific PNG (attached in a tarball). Reproduced in eog (it segfaulted). Gimp did not crash, but failed to load the entire image. pngfix confirmed that it is a malformed PNG file. It is possible that the PNG is possessed. Giving it to you so that you can reproduce this issue and hopefully fix it (overflows are bad).
Attachment got lost, it seems... gdb stacktrace also very welcome to paste here.
We'll need the malformed image to make progress on this
Sorry, looks like it was too large to attach. I've uploaded it here: https://spot.fedorapeople.org/broken-png-inside.tar.bz2
Created attachment 291818 [details] [review] Fix
The problem is the dimensions of the PNG, not the fact that it's corrupt. There's an integer overflow when populating the array of row pointers.
Should be fixed in commit 8714ab407c54d5989d15a78eb15550c2d52d95b8
Created attachment 311000 [details] [review] io-png.c: Remove GCCism Hi, Unfortunately 8714ab407c54d5989d15a78eb15550c2d52d95b8 would break builds on non-GCC, as we are doing pointer arithmetic on a gpointer (i.e. void *), which is a GCCism. With blessings, thank you!
Hi, Closing this in favor of a new bug, as the patch I have hear would break builds on GCC. With blessings, thank you!