about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorOliver Middleton <olliemail27@gmail.com>2016-02-23 00:04:24 +0000
committerOliver Middleton <olliemail27@gmail.com>2016-02-23 00:51:18 +0000
commitb340f2535277a562e3b9ec8d9bb0033a41f72bb8 (patch)
treecbb36c1f61832577be68ae4d42d0be8e388b0801 /src/libstd/sys/unix/stack_overflow.rs
parentc8fc4817dcbf50690aba1fc8bd4db336aff2dbc6 (diff)
downloadrust-b340f2535277a562e3b9ec8d9bb0033a41f72bb8.tar.gz
rust-b340f2535277a562e3b9ec8d9bb0033a41f72bb8.zip
Fix reading/writing 4 GiB or larger files on Windows 64-bit
`ReadFile` and `WriteFile` take a DWORD (u32) for the length argument
which was erroneously cast from a usize causing truncation. This meant
methods like `write_all` and `read_exact` would unexpectedly fail if
given a buffer 4 GiB or larger.

We can instead just ask for `u32::MAX` bytes if the given buffer is too
big.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions