提交 aaf431b4 编写于 作者: A Andreas Gruenbacher 提交者: Al Viro

xattr: Fail with -EINVAL for NULL attribute names

Commit 98e9cb57 improved the xattr name checks in xattr_resolve_name but
didn't update the NULL attribute name check appropriately, so NULL
attribute names lead to NULL pointer dereferences.  Turn that into
-EINVAL results instead.
Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
  fs/xattr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 e0d46f5c
......@@ -668,7 +668,7 @@ xattr_resolve_name(const struct xattr_handler **handlers, const char **name)
const struct xattr_handler *handler;
if (!*name)
return NULL;
return ERR_PTR(-EINVAL);
for_each_xattr_handler(handlers, handler) {
const char *n;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册