[PATCH] s3:loadparm: Ensure to truncate FS Volume Label at multibyte boundary

Jeremy Allison jra at samba.org
Wed May 15 20:58:41 UTC 2019

On Tue, May 14, 2019 at 06:26:07PM +0000, Shyam Rathi via samba-technical wrote:
> https://bugzilla.samba.org/show_bug.cgi?id=13947
> To reproduce, create a share with a name where 32nd byte is not the first byte of a mutlibyte character. Using CJK characters (3 bytes each) is a possible approach. For example, creating a share with name 에이에프에스삼점오생성 and trying to open a txt file in Notepad gives the following error:
>   Invalid character. For multibyte character sets, only the leading byte is
>   included without the trailing byte. For Unicode character sets, include
>   the characters 0xFFFF and 0xFFFE.
> Looking at wireshark capture, the following is seen as source of this issue:
>   GetInfo Request FS_INFO/FileFsVolumeInformation File: Rathi9\???????????
>   GetInfo Response, Error: STATUS_ILLEGAL_CHARACTER
> Proposed solution is to truncate the label name at the end of a multibyte character before the 32nd byte.
> Please review and suggest changes, improvements and other approaches.
> Regards,
> -Shyamsunder Rathi (mailto:shyam.rathi at nutanix.com)

A few slight changes to make things clearer (to me at least :-).
Changes attached and bug ID added to the commit message. Let me
know if you're OK with it.

RB+. Can I get a second Team reviewer ?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-loadparm-Ensure-to-truncate-FS-Volume-Label-at-mu.patch
Type: text/x-diff
Size: 3010 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190515/4daad26a/0001-s3-loadparm-Ensure-to-truncate-FS-Volume-Label-at-mu.diff>

More information about the samba-technical mailing list