Skip to content

Commit 00c58c4

Browse files
authored
Merge pull request ceph#56136 from NitzanMordhai/wip-nitzan-init-hash-in-chunk-ref-by-hash
cls/cas/cls_cas_internal: Initialize 'hash' value before decoding Reviewed-by: Matan Breizman <[email protected]>
2 parents 3f98758 + cffcec3 commit 00c58c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cls/cas/cls_cas_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ struct chunk_refs_by_hash_t : public chunk_refs_t::refs_t {
244244
int hash_bytes = (hash_bits + 7) / 8;
245245
while (n--) {
246246
int64_t poolid;
247-
ceph_le32 hash;
247+
ceph_le32 hash{0};
248248
uint64_t count;
249249
denc_signed_varint(poolid, p);
250250
memcpy(&hash, p.get_pos_add(hash_bytes), hash_bytes);

0 commit comments

Comments
 (0)