Changed input buffer size check to be more correct and maintainable.
This commit is contained in:
+1
-2
@@ -435,8 +435,7 @@ void MSTP_Receive_Frame_FSM(volatile struct mstp_port_struct_t *mstp_port)
|
||||
of the data. */
|
||||
/* Data */
|
||||
if ((mstp_port->DataLength) &&
|
||||
(mstp_port->DataLength <= MAX_MPDU)) {
|
||||
/* FIXME: is limit InputBufferSize or MAX_MPDU? */
|
||||
(mstp_port->DataLength <= mstp_port->InputBufferSize)) {
|
||||
/* Data - decode anyway to keep from false */
|
||||
mstp_port->Index = 0;
|
||||
mstp_port->DataCRC = 0xFFFF;
|
||||
|
||||
Reference in New Issue
Block a user