erofs-utils: lib: actually skip the unidentified xattrs
authorSandeep Dhavale <dhavale@google.com>
Tue, 20 Aug 2024 21:01:23 +0000 (14:01 -0700)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 21 Aug 2024 03:47:28 +0000 (11:47 +0800)
commitbb8a0f34727a4c0524792fecf9d02c5135f6e8c3
tree336ef81b9fc6c0d913a6d95c1e3417e3313e221a
parent93c46f53ece7fa5a6fc84df20c9a00b813c31edf
erofs-utils: lib: actually skip the unidentified xattrs

parse_one_xattr() will return null if it detects unidentified xattr.
In such cases we need to skip this xattr which was our intention than
try to add it in erofs_xattr_add() which results in null pointer
dereference.

Fixes: 3037f8958f3b ("erofs-utils: skip all unidentified xattrs from local paths")
Signed-off-by: Sandeep Dhavale <dhavale@google.com>
Link: https://lore.kernel.org/r/20240820210123.2684886-2-dhavale@google.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
lib/xattr.c