Removed redundant length check in handle_write_file_record()

This commit is contained in:
Valerio De Benedetto 2024-12-12 22:31:51 +01:00
parent cfc1dd00c8
commit 9b93660e81

View File

@ -1450,7 +1450,7 @@ static nmbs_error handle_write_file_record(nmbs_t* nmbs) {
uint16_t size = request_size;
nmbs->msg.buf_idx = msg_buf_idx; // restore context
if (request_size < 0x07 || request_size > 0xFB)
if (request_size < 7)
return send_exception_msg(nmbs, NMBS_EXCEPTION_ILLEGAL_DATA_VALUE);
do {