orangefs: off by ones in xattr size checks
A previous patch which claimed to remove off by ones actually introduced them. strlen() returns the length of the string not including the NUL character. We are using strcpy() to copy "name" into a buffer which is ORANGEFS_MAX_XATTR_NAMELEN characters long. We should make sure to leave space for the NUL, otherwise we're writing one character beyond the end of the buffer. Fixes: e675c5ec ("orangefs: clean up oversize xattr validation") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMike Marshall <hubcap@omnibond.com>
Showing
想要评论请 注册 或 登录