From fd91a35a5cb5c13bc6bb67722f5964d9f5cbff4d Mon Sep 17 00:00:00 2001 From: skarg Date: Fri, 31 Aug 2007 21:04:14 +0000 Subject: [PATCH] Changed input buffer size check to be more correct and maintainable. --- bacnet-stack/mstp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bacnet-stack/mstp.c b/bacnet-stack/mstp.c index 0e4a9e09..52016517 100644 --- a/bacnet-stack/mstp.c +++ b/bacnet-stack/mstp.c @@ -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;