From c730d7ba202286bfce3ee180df413486411e0b72 Mon Sep 17 00:00:00 2001 From: Ciro Nishiguchi Date: Fri, 22 Nov 2019 10:25:55 -0600 Subject: rfnoc: fix invalid access when sending packet with no samples --- host/lib/include/uhdlib/transport/tx_streamer_impl.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'host/lib/include/uhdlib') 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; -- cgit v1.2.3