diff options
author | michael-west <michael.west@ettus.com> | 2014-03-11 23:55:11 -0700 |
---|---|---|
committer | michael-west <michael.west@ettus.com> | 2014-03-11 23:55:11 -0700 |
commit | 50a2ab1e979c191776e4fe2d08b895941e90bd18 (patch) | |
tree | 3d721b2fc8b554239a8a8e46c742427c7f579f8d /host/lib | |
parent | 62862ecc3ed4be097d09502d57d91543f3c41bf8 (diff) | |
download | uhd-50a2ab1e979c191776e4fe2d08b895941e90bd18.tar.gz uhd-50a2ab1e979c191776e4fe2d08b895941e90bd18.tar.bz2 uhd-50a2ab1e979c191776e4fe2d08b895941e90bd18.zip |
Added assertion to make sure we are resizing buffer to a value >0.
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/transport/nirio/rpc/rpc_client.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/host/lib/transport/nirio/rpc/rpc_client.cpp b/host/lib/transport/nirio/rpc/rpc_client.cpp index 32a40a576..028327c2e 100644 --- a/host/lib/transport/nirio/rpc/rpc_client.cpp +++ b/host/lib/transport/nirio/rpc/rpc_client.cpp @@ -16,6 +16,7 @@ // #include <uhd/transport/nirio/rpc/rpc_client.hpp> +#include <uhd/exception.hpp> #include <boost/bind.hpp> #include <boost/version.hpp> #include <boost/format.hpp> @@ -174,6 +175,7 @@ void rpc_client::_handle_response_hdr(const boost::system::error_code& err, size if (!_exec_err && (transferred == expected)) { //Response header received. Verify that it is expected if (func_args_header_t::match_function(_request.header, _response.header)) { + UHD_ASSERT_THROW(_response.header.func_args_size); _response.data.resize(_response.header.func_args_size); //Wait for response data |