exiv2 crashes when examining previews
A user has supplied me with a photo that causes Exiv2's preview manager to crash at initialization. The stack trace is attached. The segfault happens here:
#0 0x00277314 in Exiv2::DataValue::toLong (this=0x8088a50, n=0)
It's easily reproducible using this command:
$ exiv2 -pp <filename>@
The user has asked I not share the photo publicly. I can make it available to any developer who's going to work through this problem. Just email me at email@example.com.
This bug is a big problem for Shotwell and gexiv2, as the preview manager is initialized whenever an image is loaded.
Updated by Andreas Huggel almost 11 years ago
Indeed, there are several unprotected toLong() calls in this area. The same problem we discussed some time ago, only this time in the library itself.
Can you please try if r2375 solves the problem? If it helps, you can apply the attached patch to a recent version of exiv2, which will let you compile a binary compatible library.