Skip to content

Backport windows readdir nul issue - #3268

Merged
harendra-kumar merged 6 commits into
release/streamly-0.11from
backport-windows-readdir-nul
Oct 27, 2026
Merged

harendra-kumar merged 6 commits into
release/streamly-0.11from
backport-windows-readdir-nul

Conversation

@harendra-kumar

Copy link
Copy Markdown
Member

No description provided.

openDirStream passed the UTF-16 path to FindFirstFileW through
asCStringUnsafe, which appends a one byte NUL. The second byte of the
terminator was uninitialized memory, so the pattern could become
dir\*<garbage> and FindFirstFileW failed with ERROR_FILE_NOT_FOUND on an
existing directory. asCWString appends a two byte NUL.
The DirIO test-suite is not built on Windows, so the missing wide NUL in
the FindFirstFileW pattern of openDirStream was not caught. The new test
reads directories with names of 1 to 64 characters, 20 times each.
Bump version in streamly-core/configure.ac
@harendra-kumar
harendra-kumar merged commit 5e90da6 into release/streamly-0.11 Oct 27, 2026
16 of 18 checks passed
@harendra-kumar
harendra-kumar deleted the backport-windows-readdir-nul branch October 27, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant