Re: [PATCH 0/3] ceph: don't NULL terminate virtual xattr values

2019-06-14 Thread Andreas Gruenbacher
On Fri, 14 Jun 2019 at 15:46, Jeff Layton wrote: > kcephfs has several "virtual" xattrs that return strings that are > currently populated using snprintf(), which always NULL terminates the > string. > > This leads to the string being truncated when we use a buffer length > acquired by calling get

[PATCH 0/3] ceph: don't NULL terminate virtual xattr values

2019-06-14 Thread Jeff Layton
kcephfs has several "virtual" xattrs that return strings that are currently populated using snprintf(), which always NULL terminates the string. This leads to the string being truncated when we use a buffer length acquired by calling getxattr with a 0 size first. The last character of the string e