PNGs with empty metadata fields crash the file-png plugin
- GIMP version: Gimp 2.10.34
- Package flatpak from gimp.org, Gimp 2.10.34 from AUR > https://archlinux.org/packages/extra/x86_64/gimp/
- Operating System: Arch Linux x86_64 Linux 6.1.34-1-lts
PNG files above 26 MiB crash the file-png plugin.
Example PNG > scan0027.zip
Is the bug reproducible? Yes
Reproduction steps: File > Open > [PNG with an empty metadata field]
…
Expected result: PNG Opens
Actual result: PNG Does not open, Gimp prints an error message.
GIMP Message
Plug-in crashed: "file-png"
(/usr/lib/gimp/2.0/plug-ins/file-png/file-png)
The dying plug-in may have messed up GIMP's internal state. You may want to save your images and restart GIMP to be on the safe side.
GIMP Message
Opening '/media/VeryBigDrive/png/scan0027.png' failed:
Procedure 'file-png-load' returned no return values
output of imagemagick and exiftool:
magick identify scan0027.png
scan0027.png PNG 5452x4088 5452x4088+0+0 8-bit sRGB 27.4732MiB 0.000u 0:00.000
exiftool -k scan0027.png
ExifTool Version Number : 12.60
File Name : scan0027.png
Directory : .
File Size : 29 MB
File Modification Date/Time : 2023:03:04 01:14:29-07:00
File Access Date/Time : 2023:06:19 22:23:55-06:00
File Inode Change Date/Time : 2023:06:19 22:21:50-06:00
File Permissions : -rwxrwxrwx
File Type : PNG
File Type Extension : png
MIME Type : image/png
Image Width : 5452
Image Height : 4088
Bit Depth : 8
Color Type : RGB
Compression : Deflate/Inflate
Filter : Adaptive
Interlace : Noninterlaced
Pixels Per Unit X : 47244
Pixels Per Unit Y : 47244
Pixel Units : meters
Modify Date : 2023:03:04 08:14:15
Author :
Description :
Copyright :
Creation Time :
Software :
Disclaimer :
PNG Warning :
Source :
Comment :
Title :
Image Size : 5452x4088
Megapixels : 22.3
I made sure to test that this was a PNG exclusive problem, a 1GB .tif file opened normally. I also changed the amount of ram in tile cache size (20 GiB) with no change. I tried this on a new installation of arch linux in kde-plasma with the same result across both.
The issue seems to have been fixed with flatpak versions of 2.99.14 and 2.99.15, I didn't experience any problem with those.
exiv2 tracker with the same issue > https://github.com/Exiv2/exiv2/issues/2650