summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-07-27 15:56:44 +0100
committerHugo Landau <hlandau@openssl.org>2023-08-10 18:19:50 +0100
commit451055d2882eb81c8d620eb7736a4c1236e30935 (patch)
tree8957ca0200929a0fe087bc80b7a6132f4d3e2dda /test
parentdbf247ad1dd0fc4c7b365593a9a5c69fc94a3732 (diff)
QUIC FC: TEST: Coverity
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21565)
Diffstat (limited to 'test')
-rw-r--r--test/quic_fc_test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/quic_fc_test.c b/test/quic_fc_test.c
index 14179b6d4c..56ea103a42 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],