Uncomment this to fix a problem with Sanyo MakerNotes. It's probably best
authorDan Fandrich <dan@coneharvesters.com>
Wed, 14 Jan 2009 07:22:14 +0000 (23:22 -0800)
committerDan Fandrich <dan@coneharvesters.com>
Wed, 14 Jan 2009 07:22:14 +0000 (23:22 -0800)
not to in most cases because it seems to only affect the thumbnail tag
which is duplicated in IFD 1, and fixing the offset could actually cause
problems with other software that expects the broken form.
Also, don't log such detected corruption with EXIF_LOG_CODE_CORRUPT_DATA
as the exif front-end currently aborts when it gets such logs. It might be
better to change that behaviour of the front-end instead.

libexif/olympus/exif-mnote-data-olympus.c

index 8b8322c..dbe9a0c 100644 (file)
 
 #define DEBUG
 
-#define EXIF_OVERCOME_SANYO_OFFSET_BUG
+/* Uncomment this to fix a problem with Sanyo MakerNotes. It's probably best
+ * not to in most cases because it seems to only affect the thumbnail tag
+ * which is duplicated in IFD 1, and fixing the offset could actually cause
+ * problems with other software that expects the broken form.
+ */
+/*#define EXIF_OVERCOME_SANYO_OFFSET_BUG */
 
 static void
 exif_mnote_data_olympus_clear (ExifMnoteDataOlympus *n)
@@ -423,7 +428,7 @@ exif_mnote_data_olympus_load (ExifMnoteData *en,
 #endif
                        }
                        if (dataofs + s > buf_size)  {
-                               exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
+                               exif_log (en->log, EXIF_LOG_CODE_DEBUG,
                                          "ExifMnoteOlympus",
                                          "Tag data past end of buffer (%u > %u)",
                                          dataofs+s, buf_size);