diff --git a/src/shrpx_client_handler.cc b/src/shrpx_client_handler.cc index 6985e079..1ecfbbe7 100644 --- a/src/shrpx_client_handler.cc +++ b/src/shrpx_client_handler.cc @@ -519,7 +519,7 @@ void ClientHandler::signal_reset_upstream_conn_rtimer() { int ClientHandler::validate_next_proto() { const unsigned char *next_proto = nullptr; - unsigned int next_proto_len; + unsigned int next_proto_len = 0; // First set callback for catch all cases on_read_ = &ClientHandler::upstream_read; diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index 8527aa53..28bd34b2 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -1424,7 +1424,7 @@ int Http2Session::connection_made() { if (ssl_ctx_) { const unsigned char *next_proto = nullptr; - unsigned int next_proto_len; + unsigned int next_proto_len = 0; SSL_get0_next_proto_negotiated(conn_.tls.ssl, &next_proto, &next_proto_len); for (int i = 0; i < 2; ++i) { if (next_proto) {