diff options
author | Ciro Nishiguchi <ciro.nishiguchi@ni.com> | 2019-11-22 10:25:55 -0600 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 12:21:34 -0800 |
commit | c730d7ba202286bfce3ee180df413486411e0b72 (patch) | |
tree | 51b22d5a6178ac7ee61978da43c2872a0a5bd36b /host | |
parent | e4c72d53d612ab9470f366fd594cfaf530590a13 (diff) | |
download | uhd-c730d7ba202286bfce3ee180df413486411e0b72.tar.gz uhd-c730d7ba202286bfce3ee180df413486411e0b72.tar.bz2 uhd-c730d7ba202286bfce3ee180df413486411e0b72.zip |
rfnoc: fix invalid access when sending packet with no samples
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/include/uhdlib/transport/tx_streamer_impl.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/host/lib/include/uhdlib/transport/tx_streamer_impl.hpp b/host/lib/include/uhdlib/transport/tx_streamer_impl.hpp index 42250c4b1..d6555ad35 100644 --- a/host/lib/include/uhdlib/transport/tx_streamer_impl.hpp +++ b/host/lib/include/uhdlib/transport/tx_streamer_impl.hpp @@ -229,7 +229,7 @@ public: // Send requests with no samples are handled here, such as end of // burst. Send packets need to have at least one sample based on the // chdr specification, so we use _zero_buffs here. - _send_one_packet(_zero_buffs.data(), + _send_one_packet(_zero_buffs, 0, // buffer offset 1, // num samples metadata, @@ -368,6 +368,8 @@ private: const bool eov, const int32_t timeout_ms) { + assert(buffs.size() == get_num_channels()); + if (!_zero_copy_streamer.get_send_buffs( _out_buffs, num_samples, metadata, eov, timeout_ms)) { return 0; |