mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 12:39:31 +03:00
98a8a71236
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. cc #31841 This is the same as rust-lang-nursery/rand#99. I think it's a good idea to keep the implementations in sync. r? @alexcrichton