Skip to content
Commit 5f13e587 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mike Marshall
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent ba5e79ea
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment