]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
immutable_object_cache: Endian fix for HeaderHelper 30079/head
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 2 Sep 2019 19:29:26 +0000 (21:29 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Thu, 5 Sep 2019 08:50:04 +0000 (10:50 +0200)
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 <ulrich.weigand@de.ibm.com>
src/tools/immutable_object_cache/Types.h

index 30324d5e898d10a669094269c612003e952226bc..7967d16564f056738010f6b16c0fa8fdc5ab8505 100644 (file)
@@ -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() {