diff options
author | Johannes Demel <johannes.demel@ettus.com> | 2013-11-20 16:30:37 -0800 |
---|---|---|
committer | Johannes Demel <johannes.demel@ettus.com> | 2013-11-20 16:30:37 -0800 |
commit | 8c79e285b0f4b6b80f8ae1fe69a5288d2b4d0194 (patch) | |
tree | 8f55778a3bf4c0e4adb2095ac0dd61345d59b778 | |
parent | dee55b030e0056cdaac5bc595818bddad0ed680e (diff) | |
download | uhd-8c79e285b0f4b6b80f8ae1fe69a5288d2b4d0194.tar.gz uhd-8c79e285b0f4b6b80f8ae1fe69a5288d2b4d0194.tar.bz2 uhd-8c79e285b0f4b6b80f8ae1fe69a5288d2b4d0194.zip |
stall-bug: generalized message size handling
-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; |