The Windows implementation for getrandom_inner() calls RtlGenRandom. However, the length parameter is a ULONG (i.e. a u32).
Thus, if a buffer of length 2^32 is passed to getrandom() on Windows, the call dest.len() as ULONG truncates the value to 0. This results in the function seeming to succeed, but without writing any data.
Thanks to @briansmith's ring implementation, for pointing this out.
The Windows implementation for
getrandom_inner()callsRtlGenRandom. However, the length parameter is aULONG(i.e. au32).Thus, if a buffer of length
2^32is passed togetrandom()on Windows, the calldest.len() as ULONGtruncates the value to 0. This results in the function seeming to succeed, but without writing any data.Thanks to @briansmith's ring implementation, for pointing this out.