From: Gao Xiang via Linux-erofs <linux-erofs@lists.ozlabs.org>
To: Sheng Yong <shengyong@oppo.com>
Cc: hsiangkao@linux.alibaba.com, linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH] erofs-utils: lib: fix sorting shared xattrs
Date: Fri, 13 Sep 2024 23:39:14 +0800 [thread overview]
Message-ID: <ZuRcogZoSD2/QiCm@debian> (raw)
In-Reply-To: <20240913143542.3265071-1-shengyong@oppo.com>
Hi Yong,
On Fri, Sep 13, 2024 at 10:35:42PM +0800, Sheng Yong via Linux-erofs wrote:
> The length of xattr_item->kvbuf is calculated by EROFS_XATTR_KVSIZE,
> and the key part has a trailing '\0' before the value part. When qsort
> compares two xattr_items, the key-value length should be calculated by
> EROFS_XATTR_KVSIZE, and use memcmp instead of strncmp to avoid key-value
> string being cut by '\0'.
>
> Fixes: 5df285cf405d ("erofs-utils: lib: refactor extended attribute name prefixes")
> Signed-off-by: Sheng Yong <shengyong@oppo.com>
Yeah, good catch! And many thanks for fixing this!
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Thanks,
Gao Xiang
prev parent reply other threads:[~2024-09-13 15:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-13 14:35 [PATCH] erofs-utils: lib: fix sorting shared xattrs Sheng Yong via Linux-erofs
2024-09-13 15:39 ` Gao Xiang via Linux-erofs [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZuRcogZoSD2/QiCm@debian \
--to=linux-erofs@lists.ozlabs.org \
--cc=hsiangkao@linux.alibaba.com \
--cc=shengyong@oppo.com \
--cc=xiang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.