Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
modbus_send_raw_request does not check raw_req_length before memcpy #207
In modbus_send_raw_request the raw request is checked to contain at least a function and a slave. On the other end the maximum length of the raw request is not checked but instead it is copied directly into the request.
It would be useful to perform a length check before the memcpy to avoid buffer overflows. In case of a too long raw request the same errno as for missing slave/function should be set.