nghttpx: Set 0 to next_proto_len explicitly for clarification
This commit is contained in:
parent
ea5f424dec
commit
2a59c832c1
|
@ -519,7 +519,7 @@ void ClientHandler::signal_reset_upstream_conn_rtimer() {
|
||||||
|
|
||||||
int ClientHandler::validate_next_proto() {
|
int ClientHandler::validate_next_proto() {
|
||||||
const unsigned char *next_proto = nullptr;
|
const unsigned char *next_proto = nullptr;
|
||||||
unsigned int next_proto_len;
|
unsigned int next_proto_len = 0;
|
||||||
|
|
||||||
// First set callback for catch all cases
|
// First set callback for catch all cases
|
||||||
on_read_ = &ClientHandler::upstream_read;
|
on_read_ = &ClientHandler::upstream_read;
|
||||||
|
|
|
@ -1424,7 +1424,7 @@ int Http2Session::connection_made() {
|
||||||
|
|
||||||
if (ssl_ctx_) {
|
if (ssl_ctx_) {
|
||||||
const unsigned char *next_proto = nullptr;
|
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);
|
SSL_get0_next_proto_negotiated(conn_.tls.ssl, &next_proto, &next_proto_len);
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
if (next_proto) {
|
if (next_proto) {
|
||||||
|
|
Loading…
Reference in New Issue