Skip to content

Commit

Permalink
Fix usage of ossl_assert()
Browse files Browse the repository at this point in the history
Reviewed-by: Andy Polyakov <appro@openssl.org>
GH: #6044
  • Loading branch information
kroeckx committed Apr 23, 2018
1 parent 198a2ed commit 5b820d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto/rand/rand_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ static size_t sysctl_random(char *buf, size_t buflen)
* the sysctl returns long and we want to request something not a multiple
* of longs, which should never be the case.
*/
ossl_assert(buflen % sizeof(long) == 0);
if (!ossl_assert(buflen % sizeof(long) == 0))
return 0;

mib[0] = CTL_KERN;
mib[1] = KERN_ARND;
Expand Down

0 comments on commit 5b820d7

Please sign in to comment.