From: Jan Patera Date: Mon, 20 Oct 2008 07:52:43 +0000 (+0200) Subject: Please don't crash in mnote_pentax_tag_get_description & mnote_olympus_tag_get_descri... X-Git-Tag: libexif-0_6_21-release~221 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5580cf8da8c960446e69bddb9b9cb31401f376a1;p=platform%2Fupstream%2Flibexif.git Please don't crash in mnote_pentax_tag_get_description & mnote_olympus_tag_get_description on unknown tags. --- diff --git a/ChangeLog b/ChangeLog index 822474b..c3ac9ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2008-10-20 Jan Patera + + * 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 + + * libexif/canon/mnote-canon-entry.c: fixed interpretation + of Auto ISO and Self-Timer entries + +2008-10-08 Aric Blumer + + * 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 * libexif/olympus/exif-mnote-data-olympus.c: bug #2071600, diff --git a/libexif/olympus/mnote-olympus-tag.c b/libexif/olympus/mnote-olympus-tag.c index fff0320..37a6bdc 100644 --- a/libexif/olympus/mnote-olympus-tag.c +++ b/libexif/olympus/mnote-olympus-tag.c @@ -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)); } diff --git a/libexif/pentax/mnote-pentax-tag.c b/libexif/pentax/mnote-pentax-tag.c index e0471f0..dd06cd9 100644 --- a/libexif/pentax/mnote-pentax-tag.c +++ b/libexif/pentax/mnote-pentax-tag.c @@ -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)); }