diff options
author | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2019-11-21 00:09:11 +0100 |
---|---|---|
committer | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2019-12-15 15:25:18 +0100 |
commit | f9fdb9d2f5a0358a3fd34b060fe23cb0eceb2e2c (patch) | |
tree | 86a9c6a1df3d2ef373002286a728a51a89569930 /include | |
parent | 2f11f2e810c7f48a001986f3eb47b3b9166e2836 (diff) |
rand_lib.c: fix null pointer dereferences after RAND_get_rand_method() failure
RAND_get_rand_method() can return a NULL method pointer in the case of a
malloc failure, so don't dereference it without a check.
Reported-by: Zu-Ming Jiang (detected by FIFUZZ)
Fixes #10480
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10490)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/randerr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/openssl/randerr.h b/include/openssl/randerr.h index 70d1a17a4c..301830bccc 100644 --- a/include/openssl/randerr.h +++ b/include/openssl/randerr.h @@ -46,6 +46,7 @@ int ERR_load_RAND_strings(void); # define RAND_F_RAND_POOL_BYTES_NEEDED 115 # define RAND_F_RAND_POOL_GROW 125 # define RAND_F_RAND_POOL_NEW 116 +# define RAND_F_RAND_PSEUDO_BYTES 126 # define RAND_F_RAND_WRITE_FILE 112 /* |