diff options
Diffstat (limited to 'crypto/rand/urandom.c')
-rw-r--r-- | crypto/rand/urandom.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/rand/urandom.c b/crypto/rand/urandom.c index 2ad4af06..a7e2ad82 100644 --- a/crypto/rand/urandom.c +++ b/crypto/rand/urandom.c @@ -188,6 +188,10 @@ int RAND_bytes(uint8_t *out, size_t requested) { if (!buf) { buf = (struct rand_buffer *)OPENSSL_malloc(BUF_SIZE); + if (!buf) { + abort(); + return 0; + } /* The buffer doesn't contain any random bytes yet * so we mark it as fully used so that it will be * filled below. */ |