]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cls/cas/cls_cas_internal: Initialize 'hash' value before decoding into it
authornmordech@redhat.com <nmordech@redhat.com>
Tue, 12 Mar 2024 06:36:29 +0000 (06:36 +0000)
committernmordech@redhat.com <nmordech@redhat.com>
Thu, 4 Apr 2024 11:23:21 +0000 (11:23 +0000)
commitf91063078cc15bed3d7eda909a6ac01fd6dd1891
treeb9382585f64813044bc9f8e8c3e18cbbf239c5a2
parentf6b3198584e82a0b07a56824e773bebebc761d8d
cls/cas/cls_cas_internal: Initialize 'hash' value before decoding into it

In the decode function for chunk_refs_by_hash_t, initialize the variable
'hash' of type ceph_le32 to zero before its first use.
This prevents the variable from containing dirty (uninitialized) values,
which could lead to unexpected behavior later in the code.

Fixes: https://tracker.ceph.com/issues/64854
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit cffcec35c5760ab9142dca06182d42900e247a3c)
src/cls/cas/cls_cas_internal.h