X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Frand%2Frand_unix.c;h=9b6971c09570a574885d4f2ae41a90289e1ec056;hb=5b820d785d6b5f9c3fedcf0ce4e4f0476a1bb9c8;hp=f6fef9ad0cddd6aff55ebd2bbfed6a403d4f99f1;hpb=198a2ed791e8f4f00d0b92272987f564ca1d9783;p=oweals%2Fopenssl.git diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c index f6fef9ad0c..9b6971c095 100644 --- a/crypto/rand/rand_unix.c +++ b/crypto/rand/rand_unix.c @@ -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;