vendor/libsodium/src/libsodium/randombytes/randombytes.c in rbnacl-libsodium-0.4.5 vs vendor/libsodium/src/libsodium/randombytes/randombytes.c in rbnacl-libsodium-0.5.0
- old
+ new
@@ -44,10 +44,12 @@
}
void
randombytes_buf(void * const buf, const size_t size)
{
- implementation->buf(buf, size);
+ if (size > (size_t) 0U) {
+ implementation->buf(buf, size);
+ }
}
int
randombytes_close(void)
{