diff options
author | Michael West <michael.west@ettus.com> | 2013-10-28 13:06:34 -0700 |
---|---|---|
committer | Michael West <michael.west@ettus.com> | 2013-10-28 13:06:34 -0700 |
commit | d5d18f87714bdf4f43c4b1a5fdcc7f62bfdee546 (patch) | |
tree | b88ae43cf0e3ab4442821d934db26644483066b2 /host/tests | |
parent | b4b970c59affbd2114c38638e86ed5f9b235cff7 (diff) | |
download | uhd-d5d18f87714bdf4f43c4b1a5fdcc7f62bfdee546.tar.gz uhd-d5d18f87714bdf4f43c4b1a5fdcc7f62bfdee546.tar.bz2 uhd-d5d18f87714bdf4f43c4b1a5fdcc7f62bfdee546.zip |
CID 1104295: Fixed use after free.
CID 1104294: Fixed use after free.
CID 1104293: Fixed use after free.
CID 1104292: Fixed use after free.
Diffstat (limited to 'host/tests')
-rw-r--r-- | host/tests/sph_recv_test.cpp | 8 |
1 files 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<std::complex<float> > mem(NUM_SAMPS_PER_BUFF*NCHANNELS); + std::complex<float> mem[NUM_SAMPS_PER_BUFF*NCHANNELS]; std::vector<std::complex<float> *> 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<std::complex<float> > mem(NUM_SAMPS_PER_BUFF*NCHANNELS); + std::complex<float> mem[NUM_SAMPS_PER_BUFF*NCHANNELS]; std::vector<std::complex<float> *> 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<std::complex<float> > mem(NUM_SAMPS_PER_BUFF*NCHANNELS); + std::complex<float> mem[NUM_SAMPS_PER_BUFF*NCHANNELS]; std::vector<std::complex<float> *> 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<std::complex<float> > mem(NUM_SAMPS_PER_BUFF*NCHANNELS); + std::complex<float> mem[NUM_SAMPS_PER_BUFF*NCHANNELS]; std::vector<std::complex<float> *> buffs(NCHANNELS); for (size_t ch = 0; ch < NCHANNELS; ch++){ buffs[ch] = &mem[ch*NUM_SAMPS_PER_BUFF]; |