Changed input buffer size check to be more correct and maintainable.

This commit is contained in:
skarg
2007-08-31 21:04:14 +00:00
parent 22b3118ead
commit fd91a35a5c
+1 -2
View File
@@ -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;