]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cls/cas/cls_cas_internal: Initialize 'hash' value before decoding into it 56136/head
authornmordech@redhat.com <nmordech@redhat.com>
Tue, 12 Mar 2024 06:36:29 +0000 (06:36 +0000)
committernmordech@redhat.com <nmordech@redhat.com>
Tue, 12 Mar 2024 09:25:49 +0000 (09:25 +0000)
commitcffcec35c5760ab9142dca06182d42900e247a3c
tree95e87e61f6a2616ff27aaa9b88665047e9377541
parentd7353ad4342f698eae25524af998101e3c847e52
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>
src/cls/cas/cls_cas_internal.h