Ensure the MakerNote data pointers are initialized with NULL.
[platform/upstream/libexif.git] / libexif / pentax / exif-mnote-data-pentax.c
index 319d4c6..c23a7e4 100644 (file)
@@ -280,6 +280,7 @@ exif_mnote_data_pentax_load (ExifMnoteData *en,
        for (i = c, o = datao; i; --i, o += 12) {
                size_t s;
 
+               memset(&n->entries[tcount], 0, sizeof(MnotePentaxEntry));
                if (CHECKOVERFLOW(o,buf_size,12)) {
                        exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
                                  "ExifMnoteDataPentax", "Short MakerNote");