Skip to content

[v13] Fix directory sharing for non-ascii directory names#31924

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

[v13] Fix directory sharing for non-ascii directory names#31924
ibeckermayer merged 4 commits intobranch/v13from
bot/backport-31899-branch/v13

Conversation

@ibeckermayer
Copy link
Copy Markdown
Contributor

Backport #31899 to branch/v13

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/v13 with commit 25d55b8 Sep 15, 2023
@ibeckermayer ibeckermayer deleted the bot/backport-31899-branch/v13 branch September 15, 2023 03:54
@camscale camscale mentioned this pull request Sep 20, 2023
@fheinecke fheinecke mentioned this pull request Sep 26, 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