From: Hugo Landau Date: Thu, 27 Jul 2023 14:56:44 +0000 (+0100) Subject: QUIC FC: TEST: Coverity X-Git-Tag: openssl-3.2.0-alpha1~239 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=451055d2882eb81c8d620eb7736a4c1236e30935;p=thirdparty%2Fopenssl.git QUIC FC: TEST: Coverity Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/21565) --- diff --git a/test/quic_fc_test.c b/test/quic_fc_test.c index 14179b6d4c4..56ea103a422 100644 --- a/test/quic_fc_test.c +++ b/test/quic_fc_test.c @@ -470,7 +470,7 @@ static int run_rxfc_script(const struct rx_test_op *script) #define MAX_STREAMS 3 int testresult = 0; const struct rx_test_op *op = script; - QUIC_RXFC conn_rxfc, stream_rxfc[MAX_STREAMS]; + QUIC_RXFC conn_rxfc = {0}, stream_rxfc[MAX_STREAMS] = {0}; /* coverity */ char stream_init_done[MAX_STREAMS] = {0}; int conn_init_done = 0; @@ -488,7 +488,8 @@ static int run_rxfc_script(const struct rx_test_op *script) break; case RX_OPC_INIT_STREAM: - if (!TEST_size_t_lt(op->stream_idx, OSSL_NELEM(stream_rxfc))) + if (!TEST_size_t_lt(op->stream_idx, OSSL_NELEM(stream_rxfc)) + || !TEST_true(conn_init_done)) goto err; if (!TEST_true(ossl_quic_rxfc_init(&stream_rxfc[op->stream_idx],