You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thus, if a buffer of length 2^32 is passed to getrandom() on Windows, the call dest.len() as ULONGtruncates the value to 0. This results in the function seeming to succeed, but without writing any data.
The Windows implementation for
getrandom_inner()
callsRtlGenRandom
. However, the length parameter is aULONG
(i.e. au32
).Thus, if a buffer of length
2^32
is passed togetrandom()
on Windows, the calldest.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 text was updated successfully, but these errors were encountered: