Skip to content

[v11] Fix directory sharing for non-ascii directory names#31922

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

[v11] Fix directory sharing for non-ascii directory names#31922
ibeckermayer merged 4 commits intobranch/v11from
bot/backport-31899-branch/v11

Conversation

@ibeckermayer
Copy link
Copy Markdown
Contributor

Backport #31899 to branch/v11

Isaiah Becker-Mayer added 4 commits September 15, 2023 00:28
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/v11 with commit 763367b Sep 15, 2023
@ibeckermayer ibeckermayer deleted the bot/backport-31899-branch/v11 branch September 15, 2023 03:56
@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