From 9863d79a994d7c84d25e7c31e204bf4cbd747f79 Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 20 Oct 2016 15:14:07 +0100 Subject: [PATCH] include/fs_types: fix crash in inodeno_t encode Passing by value tries to copy from a null and segfaults. Fixes: http://tracker.ceph.com/issues/17636 Signed-off-by: John Spray --- src/include/fs_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/fs_types.h b/src/include/fs_types.h index c5c4572a8f7..3a76cc2e697 100644 --- a/src/include/fs_types.h +++ b/src/include/fs_types.h @@ -33,7 +33,7 @@ struct denc_traits { enum { supported = 2 }; enum { featured = false }; enum { bounded = true }; - static void bound_encode(const inodeno_t o, size_t& p) { + static void bound_encode(const inodeno_t &o, size_t& p) { denc(o.val, p); } static void encode(const inodeno_t &o, buffer::list::contiguous_appender& p) { -- 2.47.3