]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
include/fs_types: fix crash in inodeno_t encode 11577/head
authorJohn Spray <john.spray@redhat.com>
Thu, 20 Oct 2016 14:14:07 +0000 (15:14 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 20 Oct 2016 14:33:30 +0000 (15:33 +0100)
Passing by value tries to copy from a null and segfaults.

Fixes: http://tracker.ceph.com/issues/17636
Signed-off-by: John Spray <john.spray@redhat.com>
src/include/fs_types.h

index c5c4572a8f75b3b82f5b5bfc66869e32c413023f..3a76cc2e6970d285e2a2985ccfefc702b7d650ef 100644 (file)
@@ -33,7 +33,7 @@ struct denc_traits<inodeno_t> {
   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) {