]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os: append null terminator manually
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 4 Jan 2016 03:31:29 +0000 (11:31 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 4 Jan 2016 03:31:29 +0000 (11:31 +0800)
Fixes: #14188
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/filestore/FileStore.cc

index 57bde5710279f284e0a4550f0e4ab3d4f565186a..30a97214e1efc98de8bdc756fc536427a516ab0e 100644 (file)
@@ -990,6 +990,8 @@ int FileStore::read_fsid(int fd, uuid_d *uuid)
 
   if (ret > 36)
     fsid_str[36] = 0;
+  else
+    fsid_str[ret] = 0;
   if (!uuid->parse(fsid_str))
     return -EINVAL;
   return 0;