[riot-notifications] [RIOT-OS/RIOT] gnrc_icmpv6_echo: avoid crashing when pktbuf full (#10869)
notifications at github.com
Fri Jan 25 17:21:19 CET 2019
### Contribution description
This PR fixes the unchecked access to `(gnrc_netif_hdr_t *)hdr->data` where `hdr` is returned from `gnrc_netif_hdr_build`. If packet buffer is full, `gnrc_netif_hdr_build` may return `NULL`. The following unchecked access to the pointer can then lead to a crash.
### Testing procedure
Produce a lot of network traffic using ping command with maximum data size and an intervall of 0, if necessary from multiple terminals so that the packet buffer becomes full, e.g.
sudo ping6 fe80::5ecf:7fff:fe80:3f08 -Ieth0 -s1392 -i0
This test should not lead to a crash.
### Issues/PRs references
Problem was found during testing PR #10862 and described in issue #10861.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* gnrc_icmpv6_echo: avoid crashing when pktbuf full
-- File Changes --
M sys/net/gnrc/network_layer/icmpv6/echo/gnrc_icmpv6_echo.c (6)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications