aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayant Chowdhary <jchowdhary@google.com>2021-12-09 01:12:33 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-12-09 01:12:33 +0000
commit4d201c8e365b56e6559d71d8c96749676a6ca99c (patch)
tree2ae62feee162969a870e440544b9e48ce221c31a
parent7ce384eda4a86e055cee4284feadb67c9175dc94 (diff)
parentafc6c77748563837cc6d6f03ca8ee6ff8773ad79 (diff)
downloadlibexif-4d201c8e365b56e6559d71d8c96749676a6ca99c.tar.gz
Zero initialize ExifMnoteData<vendor> during construction with exif_mnote_data_<vendor>_new. am: c9da78d8d9 am: 31c126f5ac am: 444375e5d8 am: afc6c77748
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/libexif/+/16248754 Change-Id: Ie7f114ec199fc1940fc65f389b5aaa2b08cc3473
-rw-r--r--libexif/canon/exif-mnote-data-canon.c2
-rw-r--r--libexif/fuji/exif-mnote-data-fuji.c2
-rw-r--r--libexif/olympus/exif-mnote-data-olympus.c2
-rw-r--r--libexif/pentax/exif-mnote-data-pentax.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/libexif/canon/exif-mnote-data-canon.c b/libexif/canon/exif-mnote-data-canon.c
index 6d97930..3a0778c 100644
--- a/libexif/canon/exif-mnote-data-canon.c
+++ b/libexif/canon/exif-mnote-data-canon.c
@@ -384,6 +384,8 @@ exif_mnote_data_canon_new (ExifMem *mem, ExifDataOption o)
if (!d)
return NULL;
+ memset(d, 0, sizeof(ExifMnoteDataCanon));
+
exif_mnote_data_construct (d, mem);
/* Set up function pointers */
diff --git a/libexif/fuji/exif-mnote-data-fuji.c b/libexif/fuji/exif-mnote-data-fuji.c
index 3f3091b..ce70bb6 100644
--- a/libexif/fuji/exif-mnote-data-fuji.c
+++ b/libexif/fuji/exif-mnote-data-fuji.c
@@ -342,6 +342,8 @@ exif_mnote_data_fuji_new (ExifMem *mem)
d = exif_mem_alloc (mem, sizeof (ExifMnoteDataFuji));
if (!d) return NULL;
+ memset(d, 0, sizeof(ExifMnoteDataFuji));
+
exif_mnote_data_construct (d, mem);
/* Set up function pointers */
diff --git a/libexif/olympus/exif-mnote-data-olympus.c b/libexif/olympus/exif-mnote-data-olympus.c
index 493463b..f11616c 100644
--- a/libexif/olympus/exif-mnote-data-olympus.c
+++ b/libexif/olympus/exif-mnote-data-olympus.c
@@ -657,6 +657,8 @@ exif_mnote_data_olympus_new (ExifMem *mem)
d = exif_mem_alloc (mem, sizeof (ExifMnoteDataOlympus));
if (!d) return NULL;
+ memset(d, 0, sizeof(ExifMnoteDataOlympus));
+
exif_mnote_data_construct (d, mem);
/* Set up function pointers */
diff --git a/libexif/pentax/exif-mnote-data-pentax.c b/libexif/pentax/exif-mnote-data-pentax.c
index b4722d6..3676563 100644
--- a/libexif/pentax/exif-mnote-data-pentax.c
+++ b/libexif/pentax/exif-mnote-data-pentax.c
@@ -443,6 +443,8 @@ exif_mnote_data_pentax_new (ExifMem *mem)
d = exif_mem_alloc (mem, sizeof (ExifMnoteDataPentax));
if (!d) return NULL;
+ memset(d, 0, sizeof(ExifMnoteDataPentax));
+
exif_mnote_data_construct (d, mem);
/* Set up function pointers */