File-jpeg plugin crashes with some specific JPEG files
Environment/Versions
-
GIMP version: 2.10.32
-
Package: flatpak
-
Operating System: Xubuntu 22.04
-
GIMP version: 2.10.30
-
Package: apt install
-
Operating System: Xubuntu 22.04
-
GIMP version: 2.10.32
-
Package: installer from gimp.org
-
Operating System: Windows
Description of the bug
With some specific JPEG files the Gimp file-jpeg plugin crashes. I've narrowed these down to some images exported from DxO PhotoLab, and they seem to contain some invalid tags in the thumbnail directory (IFD1). On windows Gimp 2.10.28 and 2.10.30 are more robust and open the files without problems. Tested also on Xubuntu, where both 2.10.30 and 2.10.32 are affected with the crash.
On Xubuntu the following is printed in the terminal:
- (file-jpeg:48): WARNING **: 16:36:30.944: Directory Thumbnail, entry 0x0111: Data area exceeds data buffer, ignoring it. double free or corruption (!prev)
There seems to be something wrong with the thumbnail data in the jpeg files, but Gimp should still be able to open them, just ignoring the invalid data. Earlier versions of Gimp worked fine.
Example image: gzipped, becauses gitlab modifies uploaded images: 221101_L6038_Nik-D.jpg.gz
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Start Gimp
- Open the attached jpeg file after gunzipping
- Observe the error about file-jpeg crash
…
Expected result: Gimp opens the file without problems
Actual result: Gimp crashes
Additional information
If you have a backtrace for a crash or a warning, paste it here.