The branch master has been updated
via b9648f31a4917b8594caebda3e6d8d313514fe24 (commit)
from dc7e42c6a12637bae1660561d3f4cef039001475 (commit)
- Log -----------------------------------------------------------------
commit b9648f31a4917b8594caebda3e6d8d313514fe24
Author: x2018 <[email protected]>
Date: Tue Nov 23 21:33:17 2021 +0800
check the return value of OPENSSL_strdup(CRYPTO_strdup) to prevent
potential memory access error
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/17113)
-----------------------------------------------------------------------
Summary of changes:
apps/lib/app_rand.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/apps/lib/app_rand.c b/apps/lib/app_rand.c
index d3181e56fa..1e10044acc 100644
--- a/apps/lib/app_rand.c
+++ b/apps/lib/app_rand.c
@@ -110,6 +110,8 @@ int opt_rand(int opt)
case OPT_R_WRITERAND:
OPENSSL_free(save_rand_file);
save_rand_file = OPENSSL_strdup(opt_arg());
+ if (save_rand_file == NULL)
+ return 0;
break;
}
return 1;