From: Jan P. <pa...@us...> - 2007-05-08 09:09:11
|
Update of /cvsroot/libexif/libexif/libexif In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv29698 Modified Files: exif-data.c exif-entry.c Log Message: 1) Added support for Olympus S760 & S770 makernote (bug #1703284) 2) Interoperability Version value is now obtained 3) Fixed crashes when looking up invalid values (bug #1457501) Index: exif-entry.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-entry.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -p -d -r1.96 -r1.97 --- exif-entry.c 26 Apr 2007 17:00:26 -0000 1.96 +++ exif-entry.c 8 May 2007 09:09:06 -0000 1.97 @@ -533,7 +533,8 @@ static struct { { EXIF_TAG_COLOR_SPACE, { {1, {N_("sRGB"), NULL}}, {2, {N_("Adobe RGB"), NULL}}, - {0xffff, {N_("Uncalibrated"), NULL}}}}, + {0xffff, {N_("Uncalibrated"), NULL}}, + {0x0000, {NULL}}}}, {0, } }; @@ -918,7 +919,7 @@ exif_entry_get_value (ExifEntry *e, char } /* Find the value */ - for (j = 0; list2[i].elem[j].values && + for (j = 0; list2[i].elem[j].values[0] && (list2[i].elem[j].index < v_short); j++); if (list2[i].elem[j].index != v_short) { snprintf (val, maxlen, _("Internal error (unknown " @@ -928,8 +929,7 @@ exif_entry_get_value (ExifEntry *e, char /* Find a short enough value */ memset (val, 0, maxlen); - for (k = 0; list2[i].elem[j].values && - list2[i].elem[j].values[k]; k++) { + for (k = 0; list2[i].elem[j].values[k]; k++) { l = strlen (_(list2[i].elem[j].values[k])); if ((maxlen > l) && (strlen (val) < l)) strncpy (val, _(list2[i].elem[j].values[k]), maxlen - 1); @@ -968,6 +968,10 @@ exif_entry_get_value (ExifEntry *e, char else strncpy (val, _(list[i].strings[j]), maxlen - 1); break; + case EXIF_TAG_INTEROPERABILITY_VERSION: + CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen); + strncpy (val, (char *) e->data, MIN (maxlen, e->size)); + break; default: if (!e->components) break; switch (e->format) { Index: exif-data.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-data.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -p -d -r1.87 -r1.88 --- exif-data.c 3 Oct 2006 19:41:36 -0000 1.87 +++ exif-data.c 8 May 2007 09:09:06 -0000 1.88 @@ -663,8 +663,8 @@ exif_data_get_type_maker_note (ExifData return EXIF_DATA_TYPE_MAKER_NOTE_NONE; /* Olympus & Nikon */ - if ((e->size >= 5) && (!memcmp (e->data, "OLYMP", 5) || - !memcmp (e->data, "Nikon", 5))) + if ((e->size >= 8) && (!memcmp (e->data, "OLYMP", 6) || + !memcmp (e->data, "OLYMPUS", 8) || !memcmp (e->data, "Nikon", 6))) return EXIF_DATA_TYPE_MAKER_NOTE_OLYMPUS; em = exif_data_get_entry (d, EXIF_TAG_MAKE); |