if(rxFrameLength <= MAC_PACKET_SIZE) {
if(rxFrameLength > 0) {
- if(rxFrameLength >= CC2420_SIZE) {
+ if(rxFrameLength > SACK_HEADER_LENGTH) {
// This packet has an FCF byte plus at least one more byte to read
call RXFIFO.continueRead(buf + 1, SACK_HEADER_LENGTH);
metadata->lqi = buf[ length ] & 0x7f;
metadata->rssi = buf[ length - 1 ];
- if(passesAddressCheck(m_p_rx_buf)) {
+ if (passesAddressCheck(m_p_rx_buf) && length >= CC2420_SIZE) {
m_p_rx_buf = signal Receive.receive( m_p_rx_buf, m_p_rx_buf->data,
length - CC2420_SIZE);
}