mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
check the return value of BIO_new_file()
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17820)
This commit is contained in:
parent
43ed242956
commit
625b0990a0
@ -1146,6 +1146,10 @@ int s_client_main(int argc, char **argv)
|
||||
break;
|
||||
case OPT_MSGFILE:
|
||||
bio_c_msg = BIO_new_file(opt_arg(), "w");
|
||||
if (bio_c_msg == NULL) {
|
||||
BIO_printf(bio_err, "Error writing file %s\n", opt_arg());
|
||||
goto end;
|
||||
}
|
||||
break;
|
||||
case OPT_TRACE:
|
||||
#ifndef OPENSSL_NO_SSL_TRACE
|
||||
|
@ -1394,6 +1394,10 @@ int s_server_main(int argc, char *argv[])
|
||||
break;
|
||||
case OPT_MSGFILE:
|
||||
bio_s_msg = BIO_new_file(opt_arg(), "w");
|
||||
if (bio_s_msg == NULL) {
|
||||
BIO_printf(bio_err, "Error writing file %s\n", opt_arg());
|
||||
goto end;
|
||||
}
|
||||
break;
|
||||
case OPT_TRACE:
|
||||
#ifndef OPENSSL_NO_SSL_TRACE
|
||||
|
Loading…
Reference in New Issue
Block a user