From 9665074fcfcedb75e043d190dca06a2453a270ad Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 2 Sep 2019 21:29:26 +0200 Subject: [PATCH] immutable_object_cache: Endian fix for HeaderHelper struct HeaderHelper is used to overlay buffer list data, which was generated via encode, and therefore holds integer data in fixed little-endian format. Thus, HeaderHelper needs to use ceph_le32 instead of uint32_t when accessing the len field. Fixes (partially): https://tracker.ceph.com/issues/41605 Signed-off-by: Ulrich Weigand --- src/tools/immutable_object_cache/Types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/immutable_object_cache/Types.h b/src/tools/immutable_object_cache/Types.h index 30324d5e898d..7967d16564f0 100644 --- a/src/tools/immutable_object_cache/Types.h +++ b/src/tools/immutable_object_cache/Types.h @@ -15,7 +15,7 @@ namespace { struct HeaderHelper { uint8_t v; uint8_t c_v; - uint32_t len; + ceph_le32 len; }__attribute__((packed)); inline uint8_t get_header_size() { -- 2.47.3