Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d36a6818 authored by Akilesh Kailash's avatar Akilesh Kailash
Browse files

libsnapshot: Initialize merge_op_start_ to zero.



merge_op_start_ is used to set the iterator for merge operations.
Uninitialized value can potentially lead to setting up
of bad iterator.

Bug: 233246309
Test: Full OTA
Signed-off-by: default avatarAkilesh Kailash <akailash@google.com>
Change-Id: I3cc48a66b532cfe8b2d87c8724d77ab3169a2ddb
Merged-In: I3cc48a66b532cfe8b2d87c8724d77ab3169a2ddb
parent 986a2dd9
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -171,11 +171,11 @@ class CowReader final : public ICowReader {
    std::optional<uint64_t> last_label_;
    std::shared_ptr<std::vector<CowOperation>> ops_;
    std::shared_ptr<std::vector<uint32_t>> merge_op_blocks_;
    uint64_t merge_op_start_;
    uint64_t merge_op_start_{};
    std::shared_ptr<std::unordered_map<uint32_t, int>> block_map_;
    uint64_t num_total_data_ops_;
    uint64_t num_ordered_ops_to_merge_;
    bool has_seq_ops_;
    uint64_t num_total_data_ops_{};
    uint64_t num_ordered_ops_to_merge_{};
    bool has_seq_ops_{};
    std::shared_ptr<std::unordered_map<uint64_t, uint64_t>> data_loc_;
    ReaderFlags reader_flag_;
};