Skip to content

[v12] Fix directory sharing for non-ascii directory names#31923

Merged
ibeckermayer merged 4 commits intobranch/v12from
bot/backport-31899-branch/v12
Sep 15, 2023
Merged

[v12] Fix directory sharing for non-ascii directory names#31923
ibeckermayer merged 4 commits intobranch/v12from
bot/backport-31899-branch/v12

Conversation

@ibeckermayer
Copy link
Copy Markdown
Contributor

Backport #31899 to branch/v12

Isaiah Becker-Mayer added 4 commits September 15, 2023 00:29
Previously we were sending the shared directory's name for PreferredDosName
(truncated at 7 characters per the spec). This works in many cases, but
if the directory name contains non-ASCII characters it could lead to a
panic when we tried to slice the name in the middle of a non-ascii UTF
character.

Instead, we now send a fixed string of "FILE" for PreferredDosName when
sharing a filesystem (directory). This value is effectively ignored, the
actual drive name is always taken from the DeviceData field which can handle
non-ASCII characters.
@ibeckermayer ibeckermayer added this pull request to the merge queue Sep 15, 2023
Merged via the queue into branch/v12 with commit 776b16d Sep 15, 2023
@ibeckermayer ibeckermayer deleted the bot/backport-31899-branch/v12 branch September 15, 2023 03:55
@camscale camscale mentioned this pull request Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants