projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
198a2ed
)
Fix usage of ossl_assert()
author
Kurt Roeckx
<kurt@roeckx.be>
Sun, 22 Apr 2018 20:04:25 +0000
(22:04 +0200)
committer
Kurt Roeckx
<kurt@roeckx.be>
Mon, 23 Apr 2018 16:45:53 +0000
(18:45 +0200)
Reviewed-by: Andy Polyakov <appro@openssl.org>
GH: #6044
crypto/rand/rand_unix.c
patch
|
blob
|
history
diff --git
a/crypto/rand/rand_unix.c
b/crypto/rand/rand_unix.c
index f6fef9ad0cddd6aff55ebd2bbfed6a403d4f99f1..9b6971c09570a574885d4f2ae41a90289e1ec056 100644
(file)
--- 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;