Re: [PATCH] exfat: fix truncated volume labels returned by FS_IOC_GETFSLABEL

From: Namjae Jeon

Date: Tue Aug 11 2026 - 05:07:19 EST


On Mon, Aug 10, 2026 at 11:58 PM Yang Wen <anmuxixixi@xxxxxxxxx> wrote:
>
> exfat_ioctl_get_volume_label() passes uniname.name_len to
> exfat_utf16_to_nls() as the output buffer length. However, name_len is
> the number of UTF-16 code units, while exfat_utf16_to_nls() expects the
> buffer size in bytes.
>
> As a result, volume labels that expand during charset conversion are
> truncated.The destination buffer is FSLABEL_MAX bytes long, so pass
> its actual size to the conversion helper.
>
> Signed-off-by: Yang Wen <anmuxixixi@xxxxxxxxx>
Applied it to #dev.
Thanks!