]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cls/cas/cls_cas_internal: Initialize 'hash' value before decoding into it 59236/head
authornmordech@redhat.com <nmordech@redhat.com>
Tue, 12 Mar 2024 06:36:29 +0000 (06:36 +0000)
committerNitzan Mordechai <nmordech@redhat.com>
Thu, 15 Aug 2024 08:47:32 +0000 (08:47 +0000)
commitdb0740400d203da0c468175d2a38df299a23aa3a
tree7ce2e7152fa5d081df876ecd86c68148262dfc4f
parent4e40180ee04925ca22652d202b88ab68135328d9
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