mirror of https://github.com/openssl/openssl
check the return value of OPENSSL_strdup(CRYPTO_strdup) to prevent potential memory access error
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17113)
This commit is contained in:
parent
dc7e42c6a1
commit
b9648f31a4
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue