From: John Spray Date: Thu, 20 Oct 2016 14:14:07 +0000 (+0100) Subject: include/fs_types: fix crash in inodeno_t encode X-Git-Tag: v11.1.0~568^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9863d79a994d7c84d25e7c31e204bf4cbd747f79;p=ceph.git 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 --- diff --git a/src/include/fs_types.h b/src/include/fs_types.h index c5c4572a8f75..3a76cc2e6970 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) {