Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nanomodbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ static nmbs_error recv_msg_header(nmbs_t* nmbs, bool* first_byte_received) {
nmbs->msg.unit_id = get_1(nmbs);
nmbs->msg.fc = get_1(nmbs);

if (length < 2 || length > 255)
if (length < 2 || length > 254)
return NMBS_ERROR_INVALID_TCP_MBAP;

// Receive the rest of the message
Expand Down