aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2016-07-12 11:24:25 -0700
committerAshish Chaudhari <ashish@ettus.com>2016-07-12 11:24:25 -0700
commitb2678c62d212c9e4674cb2dce5010b6da697131e (patch)
tree90f2a6b1db3cc2f8e62f40c128f5fad2020faa17 /host/lib/usrp
parentfd8a34c7e0e91e5a1d1d81e2912e6fb7b870f2be (diff)
downloaduhd-b2678c62d212c9e4674cb2dce5010b6da697131e.tar.gz
uhd-b2678c62d212c9e4674cb2dce5010b6da697131e.tar.bz2
uhd-b2678c62d212c9e4674cb2dce5010b6da697131e.zip
x300: Minor: Assert if FPGA image identifier is not long enough
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 2fb7df954..b59b920ab 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -1359,6 +1359,8 @@ x300_impl::both_xports_t x300_impl::make_transport(
fs_path mboard_path = fs_path("/mboards/"+boost::lexical_cast<std::string>(mb_index) / "link_max_rate");
+ UHD_ASSERT_THROW(mb.loaded_fpga_image.size() >= 2);
+
if (mb.loaded_fpga_image.substr(0,2) == "HG") {
size_t max_link_rate = 0;
if (config.iface_index == X300_IFACE_ETH0) {