[openssl-commits] [openssl] master update

Kurt Roeckx kurt at openssl.org
Mon Apr 23 16:46:29 UTC 2018


The branch master has been updated
       via  5b820d785d6b5f9c3fedcf0ce4e4f0476a1bb9c8 (commit)
      from  198a2ed791e8f4f00d0b92272987f564ca1d9783 (commit)


- Log -----------------------------------------------------------------
commit 5b820d785d6b5f9c3fedcf0ce4e4f0476a1bb9c8
Author: Kurt Roeckx <kurt at roeckx.be>
Date:   Sun Apr 22 22:04:25 2018 +0200

    Fix usage of ossl_assert()
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    GH: #6044

-----------------------------------------------------------------------

Summary of changes:
 crypto/rand/rand_unix.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c
index f6fef9a..9b6971c 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;


More information about the openssl-commits mailing list