Fixes Coverity
1534838
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21755)
OPENSSL_free(alpn_selected);
alpn_selected = NULL;
+ if (client_proto == NULL && client_proto_len != 0) {
+ BIO_printf(bio_stdout,
+ "Inconsistent SSL_get0_alpn_selected() for client!\n");
+ goto err;
+ }
+
+ if (server_proto == NULL && server_proto_len != 0) {
+ BIO_printf(bio_stdout,
+ "Inconsistent SSL_get0_alpn_selected() for server!\n");
+ goto err;
+ }
+
if (client_proto_len != server_proto_len) {
BIO_printf(bio_stdout, "ALPN selected protocols differ!\n");
goto err;