]> git.lizzy.rs Git - rust.git/commit
Auto merge of #884 - Aaron1011:fix/linux-getrandom, r=RalfJung
authorbors <bors@rust-lang.org>
Sun, 4 Aug 2019 19:50:41 +0000 (19:50 +0000)
committerbors <bors@rust-lang.org>
Sun, 4 Aug 2019 19:50:41 +0000 (19:50 +0000)
commitbc82f8329829d7efbade879839b5846bfc877a4f
treecc5bc7ff421f16b3499a43a5847d5c52eb401ae4
parent8053288bd07d3110c7f7b62e6b2bf6e181d5c8ae
parent4d3398fc6262a0159af7311524ade980637121ae
Auto merge of #884 - Aaron1011:fix/linux-getrandom, r=RalfJung

Allowing passing a null pointer to getrandom() when length is 0

The Linux kernel will handle a null pointer passed to 'getrandom'
without error, as long as the length is also 0. The `getrandom` crate
relies on this behavior: https://github.com/rust-random/getrandom/blob/ab44edf3c7af721a00e22648b6c811ccb559ba81/src/linux_android.rs#L26

Since it works fine on the actual kernel (and should continue to, due to
the kernel's backwards-compatibility guarantees), Miri should support it
as well.