Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97daf8b9 authored by Miklos Szeredi's avatar Miklos Szeredi
Browse files

ovl: allow zero size xattr



When ovl_copy_xattr() encountered a zero size xattr no more xattrs were
copied and the function returned success.  This is clearly not the desired
behavior.

Signed-off-by: default avatarMiklos Szeredi <miklos@szeredi.hu>
Cc: <stable@vger.kernel.org>
parent 8d3095f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ int ovl_copy_xattr(struct dentry *old, struct dentry *new)

	for (name = buf; name < (buf + list_size); name += strlen(name) + 1) {
		size = vfs_getxattr(old, name, value, XATTR_SIZE_MAX);
		if (size <= 0) {
		if (size < 0) {
			error = size;
			goto out_free_value;
		}