summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJohannes Demel <johannes.demel@ettus.com>2013-11-20 16:30:37 -0800
committerJohannes Demel <johannes.demel@ettus.com>2013-11-20 16:30:37 -0800
commit8c79e285b0f4b6b80f8ae1fe69a5288d2b4d0194 (patch)
tree8f55778a3bf4c0e4adb2095ac0dd61345d59b778 /host/lib
parentdee55b030e0056cdaac5bc595818bddad0ed680e (diff)
downloaduhd-8c79e285b0f4b6b80f8ae1fe69a5288d2b4d0194.tar.gz
uhd-8c79e285b0f4b6b80f8ae1fe69a5288d2b4d0194.tar.bz2
uhd-8c79e285b0f4b6b80f8ae1fe69a5288d2b4d0194.zip
stall-bug: generalized message size handling
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/cores/radio_ctrl_core_3000.cpp3
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;