Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SerialCommHub: fix reading beyond end of buffer
When converting a reply with an odd number of bytes of data ("read coils" or "read discrete inputs"), the byte-to-word conversion was reading beyond the end of the response message buffer. This is fixed by checking for the number of remaining bytes, and copying only what is left. Signed-off-by: Moritz Barsnick <[email protected]>
- Loading branch information