Ensure the MakerNote data pointers are initialized with NULL.
[platform/upstream/libexif.git] / libexif / fuji / exif-mnote-data-fuji.c
index 6671e4c..c191490 100644 (file)
@@ -198,6 +198,7 @@ exif_mnote_data_fuji_load (ExifMnoteData *en,
        for (i = c, o = datao; i; --i, o += 12) {
                size_t s;
 
+               memset(&n->entries[tcount], 0, sizeof(MnoteFujiEntry));
                if (CHECKOVERFLOW(o, buf_size, 12)) {
                        exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
                                  "ExifMnoteDataFuji", "Short MakerNote");