Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix potential crash bug. #15605

Merged
merged 3 commits into from
Jul 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions web/server/h2o/http_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ static int ssl_init()
#else
accept_ctx.ssl_ctx = SSL_CTX_new(TLS_server_method());
#endif
// Check if accept_ctx.ssl_ctx is NULL, otherwise SSL_CTX_set_options will crash
if(!accept_ctx.ssl_ctx)
{
// output error log
return -1;
ilyam8 marked this conversation as resolved.
Show resolved Hide resolved
}

SSL_CTX_set_options(accept_ctx.ssl_ctx, SSL_OP_NO_SSLv2);

Expand Down