[riot-notifications] [RIOT-OS/RIOT] nrf802154: Validate frame length before dst filter (#11191)

Martine Lenders notifications at github.com
Thu Mar 14 20:44:47 CET 2019


miri64 commented on this pull request.

My opinion is that any incoming data should be checked for its length ;-). However, I'm not sure that your solution guarantees that.

> @@ -131,6 +131,22 @@ static void _enable_tx(void)
     NRF_RADIO->TASKS_START = 1;
  }
 
+/**
+ * @brief basic ieee802.15.4 data frame validation
+ */
+static bool _data_frame_filter(void)
+{
+    size_t expected_len = ieee802154_get_frame_hdr_len(&rxbuf[1]);

Is it guaranteed, that `rxbuf` is of length 2 at least? Otherwise this needs to be checked as well.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11191#pullrequestreview-214726211
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190314/655b3177/attachment.html>


More information about the notifications mailing list