dsprenkels / randombytes

A portable C library for generating cypto-secure random bytes
MIT License
96 stars 37 forks source link

/dev/urandom: Check the return value from open() #15

Closed dsprenkels closed 6 years ago

dsprenkels commented 6 years ago

This PR changes the /dev/urandom implemantation such that the return value from open() is now checked. If it is -1, we return.

Note that we do not need to set errno, because open() has set it for us.