diff options
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/cores/radio_ctrl_core_3000.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp index 3e8de2657..27fac3471 100644 --- a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp +++ b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp @@ -304,8 +304,7 @@ private: while(msg.size() < min_buff_size && msg.size() != 0); if(msg.size() >= min_buff_size) { - UHD_ASSERT_THROW(min_buff_size <= sizeof(b.data)); - memcpy(b.data, &msg.front(), min_buff_size); + memcpy(b.data, &msg.front(), std::min(msg.size(), sizeof(b.data))); return true; } return false; |