[riot-notifications] [RIOT-OS/RIOT] gnrc_netif: Fix out-of-bounds buffer access in ieee802154 netif (#8503)

Martine Lenders notifications at github.com
Thu Feb 1 09:32:27 CET 2018


miri64 requested changes on this pull request.



> @@ -94,6 +94,10 @@ static gnrc_pktsnip_t *_recv(gnrc_netif_t *netif)
         if (nread <= 0) {
             gnrc_pktbuf_release(pkt);
             return NULL;
+        } else if (nread <= 1) {
+            DEBUG("_recv_ieee802154: received frame is too short\n");
+            gnrc_pktbuf_release(pkt);
+            return NULL;

True, but this can be merged with the if-statement above, since `nread <= 1` ⇒ `nread <= 0`

-- 
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/8503#pullrequestreview-93197325
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20180201/aa5c96ac/attachment-0001.html>


More information about the notifications mailing list