Please don't crash in mnote_pentax_tag_get_description & mnote_olympus_tag_get_descri...
authorJan Patera <patera@pictview.com>
Mon, 20 Oct 2008 07:52:43 +0000 (09:52 +0200)
committerJan Patera <patera@pictview.com>
Mon, 20 Oct 2008 07:52:43 +0000 (09:52 +0200)
on unknown tags.

ChangeLog
libexif/olympus/mnote-olympus-tag.c
libexif/pentax/mnote-pentax-tag.c

index 822474b..c3ac9ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2008-10-20  Jan Patera <patera@users.sourceforge.net>
+
+       * libexif/pentax/mnote-pentax-tag.c & olympus/mnote-olympus-tag.c:
+         Don't crash in mnote_XX_tag_get_description on unknown tags
+
+2008-10-04  Jan Patera <patera@users.sourceforge.net>
+
+       * libexif/canon/mnote-canon-entry.c: fixed interpretation
+         of Auto ISO and Self-Timer entries
+
+2008-10-08  Aric Blumer <aricblumer@users.sourceforge.net>
+
+       * libexif/exif-tag.c: GPS tags EXIF_TAG_GPS_IMG_DIRECTION_REF
+         and EXIF_TAG_GPS_IMG_DIRECTION are now recognized
+
 2008-10-04  Jan Patera <patera@users.sourceforge.net>
 
        * libexif/olympus/exif-mnote-data-olympus.c: bug #2071600,
index fff0320..37a6bdc 100644 (file)
@@ -215,7 +215,7 @@ mnote_olympus_tag_get_description (MnoteOlympusTag t)
        bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
        for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
                if (table[i].tag == t) {
-                       if (!*table[i].description)
+                       if (!table[i].description || !*table[i].description)
                                return "";
                        return (_(table[i].description));
                }
index e0471f0..dd06cd9 100644 (file)
@@ -104,7 +104,7 @@ mnote_pentax_tag_get_description (MnotePentaxTag t)
        bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
        for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
                if (table[i].tag == t) {
-                       if (!*table[i].description)
+                       if (!table[i].description || !*table[i].description)
                                return "";
                        return (_(table[i].description));
                }