From e80b1f8d8f0380b499bac8215da304a11b6ce75b Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Mon, 17 Oct 2022 15:13:05 +0200 Subject: fix(hicn-light): access to field 'local' results in a dereference of a null pointer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7251e7024c2e0a29629df2a1a7d9b0561ec0e9a6 Ticket: HICN-812 Signed-off-by: Jordan Augé --- hicn-light/src/hicn/test/test-strategy-local-remote.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hicn-light') diff --git a/hicn-light/src/hicn/test/test-strategy-local-remote.cc b/hicn-light/src/hicn/test/test-strategy-local-remote.cc index 413ac4080..6693e29c8 100644 --- a/hicn-light/src/hicn/test/test-strategy-local-remote.cc +++ b/hicn-light/src/hicn/test/test-strategy-local-remote.cc @@ -131,9 +131,12 @@ TEST_F(StrategyLocalRemoteTest, InputRemoteOutputRemote) { // fake two remote connections conn = connection_table_get_by_id(forwarder_get_connection_table(fwd_), prod_conn_id); + ASSERT_TRUE(conn != NULL); conn->local = false; + conn = connection_table_get_by_id(forwarder_get_connection_table(fwd_), cons_conn_id); + ASSERT_TRUE(conn != NULL); conn->local = false; msgbuf_.connection_id = cons_conn_id; @@ -171,9 +174,11 @@ TEST_F(StrategyLocalRemoteTest, InputLocalOutputRemote) { conn = connection_table_get_by_id(forwarder_get_connection_table(fwd_), prod_conn_id); + ASSERT_TRUE(conn != NULL); conn->local = false; conn = connection_table_get_by_id(forwarder_get_connection_table(fwd_), cons_conn_id); + ASSERT_TRUE(conn != NULL); conn->local = true; msgbuf_.connection_id = cons_conn_id; -- cgit 1.2.3-korg