From d5d18f87714bdf4f43c4b1a5fdcc7f62bfdee546 Mon Sep 17 00:00:00 2001 From: Michael West Date: Mon, 28 Oct 2013 13:06:34 -0700 Subject: CID 1104295: Fixed use after free. CID 1104294: Fixed use after free. CID 1104293: Fixed use after free. CID 1104292: Fixed use after free. --- host/tests/sph_recv_test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/host/tests/sph_recv_test.cpp b/host/tests/sph_recv_test.cpp index 9339a9739..316e24779 100644 --- a/host/tests/sph_recv_test.cpp +++ b/host/tests/sph_recv_test.cpp @@ -395,7 +395,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_normal){ //check the received packets size_t num_accum_samps = 0; - std::vector > mem(NUM_SAMPS_PER_BUFF*NCHANNELS); + std::complex mem[NUM_SAMPS_PER_BUFF*NCHANNELS]; std::vector *> buffs(NCHANNELS); for (size_t ch = 0; ch < NCHANNELS; ch++){ buffs[ch] = &mem[ch*NUM_SAMPS_PER_BUFF]; @@ -481,7 +481,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_sequence_error){ //check the received packets size_t num_accum_samps = 0; - std::vector > mem(NUM_SAMPS_PER_BUFF*NCHANNELS); + std::complex mem[NUM_SAMPS_PER_BUFF*NCHANNELS]; std::vector *> buffs(NCHANNELS); for (size_t ch = 0; ch < NCHANNELS; ch++){ buffs[ch] = &mem[ch*NUM_SAMPS_PER_BUFF]; @@ -574,7 +574,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_time_error){ //check the received packets size_t num_accum_samps = 0; - std::vector > mem(NUM_SAMPS_PER_BUFF*NCHANNELS); + std::complex mem[NUM_SAMPS_PER_BUFF*NCHANNELS]; std::vector *> buffs(NCHANNELS); for (size_t ch = 0; ch < NCHANNELS; ch++){ buffs[ch] = &mem[ch*NUM_SAMPS_PER_BUFF]; @@ -659,7 +659,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_fragment){ //check the received packets size_t num_accum_samps = 0; - std::vector > mem(NUM_SAMPS_PER_BUFF*NCHANNELS); + std::complex mem[NUM_SAMPS_PER_BUFF*NCHANNELS]; std::vector *> buffs(NCHANNELS); for (size_t ch = 0; ch < NCHANNELS; ch++){ buffs[ch] = &mem[ch*NUM_SAMPS_PER_BUFF]; -- cgit v1.2.3