From 50a2ab1e979c191776e4fe2d08b895941e90bd18 Mon Sep 17 00:00:00 2001 From: michael-west Date: Tue, 11 Mar 2014 23:55:11 -0700 Subject: Added assertion to make sure we are resizing buffer to a value >0. --- host/lib/transport/nirio/rpc/rpc_client.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'host/lib') 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 +#include #include #include #include @@ -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 -- cgit v1.2.3