Merge "fs_mgr: Clear AvbOps struct." am: 6ea4f213d8 am: 983d542d49 am: 86da4a42e8
am: 91a0f9e970
Change-Id: Ib243c4ad35eb104370b76f4308c3feee1682353a
diff --git a/fs_mgr/fs_mgr_avb_ops.cpp b/fs_mgr/fs_mgr_avb_ops.cpp
index edcfd54..caee4ec 100644
--- a/fs_mgr/fs_mgr_avb_ops.cpp
+++ b/fs_mgr/fs_mgr_avb_ops.cpp
@@ -96,7 +96,9 @@
// We only need to provide the implementation of read_from_partition()
// operation since that's all what is being used by the avb_slot_verify().
// Other I/O operations are only required in bootloader but not in
- // user-space so we set them as dummy operations.
+ // user-space so we set them as dummy operations. Also zero the entire
+ // struct so operations added in the future will be set to NULL.
+ memset(&avb_ops_, 0, sizeof(AvbOps));
avb_ops_.read_from_partition = read_from_partition;
avb_ops_.read_rollback_index = dummy_read_rollback_index;
avb_ops_.validate_vbmeta_public_key = dummy_validate_vbmeta_public_key;