Bug #573
Crash in ExifData::getThumbnail () with corrupt jpeg
0%
Description
Try to process the attached jpeg file and you will see it crashing in ExifData::getThumbnail() in exif.cpp because it calls pos->toLong() but *pos is empty so it has no value.
Additional information:
Here is a patch that fixes the crash:
--- exif.cpp 2008-09-23 11:41:35.044651776 -0600
+++ exif-new.cpp 2008-09-22 13:11:32.000000000 -0600@ -1019,7 +1019,7
@
{
Thumbnail::AutoPtr thumbnail;
const_iterator pos = findKey(ExifKey("Exif.Thumbnail.Compression"));
- if (pos != end()) {
+ if (pos != end() && pos->size() > 0) {
long compression = pos->toLong();
if (compression == 6) {
thumbnail = Thumbnail::AutoPtr(new JpegThumbnail);
Files
Related issues
History
Updated by Andreas Huggel about 13 years ago
Updated by Andreas Huggel about 13 years ago
The attached image has a badly corrupted thumbnail IFD (IFD1).