Exiv2 / exiv2

Image metadata library and tools
http://www.exiv2.org/
Other
934 stars 281 forks source link

readMetadata() crashes for a specific image #2588

Open megibyan opened 1 year ago

megibyan commented 1 year ago

readMetadata() sporadically crashes for the attached image; when there is no crash, no metadata can be read through the C++ API, while online readers can extract both Exif and IPTC metadata. I tried with 0.27.2, 0.27.5, and 0.27.6.

Example code:

...
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(file);
image->readMetadata();

The issue can be reproduced for Windows 11 and MacOS ARM. n01448951_5104

kamiccolo commented 1 year ago

Running 0.27.6, 0.27.7 and 0.27.8 while acting on warnings:

Warning: IPTC dataset Iptc.0x0074.0x003e has invalid size 169; skipped.
Warning: Failed to decode IPTC metadata.

Could You please provide full reproducable source-code for Your test case? Can it be that You're ignoring some serious exceptions being thrown?