diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2016-07-12 11:24:25 -0700 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2016-07-12 11:24:25 -0700 |
commit | b2678c62d212c9e4674cb2dce5010b6da697131e (patch) | |
tree | 90f2a6b1db3cc2f8e62f40c128f5fad2020faa17 /host/lib/usrp/x300 | |
parent | fd8a34c7e0e91e5a1d1d81e2912e6fb7b870f2be (diff) | |
download | uhd-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/x300')
-rw-r--r-- | host/lib/usrp/x300/x300_impl.cpp | 2 |
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) { |