diff options
author | Jordan Augé <jordan.auge+fdio@cisco.com> | 2022-10-17 15:13:05 +0200 |
---|---|---|
committer | Jordan Augé <jordan.auge+fdio@cisco.com> | 2022-10-17 15:13:05 +0200 |
commit | e80b1f8d8f0380b499bac8215da304a11b6ce75b (patch) | |
tree | ad1851f02f845c6badb9726f7e7e2e596c5c3acf /hicn-light/src | |
parent | 1831c27adeb851b7b28e57342f4893a1d3b7dce2 (diff) |
fix(hicn-light): access to field 'local' results in a dereference of a null pointer
Change-Id: I7251e7024c2e0a29629df2a1a7d9b0561ec0e9a6
Ticket: HICN-812
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'hicn-light/src')
-rw-r--r-- | hicn-light/src/hicn/test/test-strategy-local-remote.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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; |