boostorg / boostorg/iostreams

file_descriptor_impl::write() fails silently on Windows for writes of lengths that don't fit in a DWORD

Open
#76 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
48
Forks
124
PR merge metrics
No merged PRs in 30d

Description

https://github.com/boostorg/iostreams/blob/29a831798ec6337848d1f2e8595b59e5503e4f21/src/file_descriptor.cpp#L301

that static cast overflows when n doesn't fit in a DWORD, but then the un-overflowed value is returned. pass it 5GB to write and it'll write 1GB and cheerfully tell the caller it wrote the whole 5GB.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.