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-25 01:35:41 +0000
committerOliver Middleton <olliemail27@gmail.com>2016-02-25 01:35:41 +0000
commitac3cc33fee5e0f576cc9f04f7df40cd5d968be43 (patch)
tree41dbd37d5c3467ec4826487e3c4631412284938b /src/libstd/sys/unix/stack_overflow.rs
parent0ef8d426050318934d16d962325ec002eaf0c29d (diff)
downloadrust-ac3cc33fee5e0f576cc9f04f7df40cd5d968be43.tar.gz
rust-ac3cc33fee5e0f576cc9f04f7df40cd5d968be43.zip
rand: Fix filling buffers 4 GiB or larger with OsRng::fill_bytes on Windows
CryptGenRandom takes a DWORD (u32) for the length so it only supports
writing u32::MAX bytes at a time.

Casting the length from a usize caused truncation meaning the whole
buffer was not always filled.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions