Update of /cvsroot/libexif/libexif/libexif/olympus
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21864
Modified Files:
exif-mnote-data-olympus.c
Log Message:
Fix of bugs #1773810, #1774626, gnome bug #466044:
Olympus files have main IFD in MM order as well as makernote, but makernote endianness
was guessed wrongly. Bug introduced when fixing bug #1525770.
Index: exif-mnote-data-olympus.c
===================================================================
RCS file: /cvsroot/libexif/libexif/libexif/olympus/exif-mnote-data-olympus.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -p -d -r1.30 -r1.31
--- exif-mnote-data-olympus.c 25 Jun 2007 05:55:23 -0000 1.30
+++ exif-mnote-data-olympus.c 16 Aug 2007 19:49:34 -0000 1.31
@@ -230,6 +230,15 @@ exif_mnote_data_olympus_load (ExifMnoteD
else if (buf[o2 + 6 + 1] == 1)
n->order = EXIF_BYTE_ORDER_MOTOROLA;
o2 += 8;
+ if (o2 >= buf_size) return;
+ c = exif_get_short (buf + o2, n->order);
+ if ((!(c & 0xFF)) && (c > 0x500)) {
+ if (n->order == EXIF_BYTE_ORDER_INTEL) {
+ n->order = EXIF_BYTE_ORDER_MOTOROLA;
+ } else {
+ n->order = EXIF_BYTE_ORDER_INTEL;
+ }
+ }
} else if (!memcmp (buf + o2, "OLYMPUS", 8)) {
/* Olympus S760, S770 */
|