don't dereference NULL (CID 4)
authorHubert Figuière <hub@figuiere.net>
Fri, 11 May 2007 02:59:57 +0000 (22:59 -0400)
committerHubert Figuière <hub@figuiere.net>
Fri, 11 May 2007 02:59:57 +0000 (22:59 -0400)
libexif/exif-data.c

index d7101c5..6b6f27c 100644 (file)
@@ -193,7 +193,13 @@ exif_data_load_data_entry (ExifData *data, ExifEntry *entry,
 
        /* If this is the MakerNote, remember the offset */
        if (entry->tag == EXIF_TAG_MAKER_NOTE) {
-               if (entry->size > 6) exif_log (data->priv->log,
+               if (entry->data) {
+                       exif_log (data->priv->log,
+                                               EXIF_LOG_CODE_DEBUG, "ExifData",
+                                               "MakerNote found with NULL data");      
+               }
+               else if (entry->size > 6) 
+                       exif_log (data->priv->log,
                                               EXIF_LOG_CODE_DEBUG, "ExifData",
                                               "MakerNote found (%02x %02x %02x %02x "
                                               "%02x %02x %02x...).",