We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b27344 commit af91a54Copy full SHA for af91a54
subsys/net/ip/ipv4.c
@@ -142,6 +142,10 @@ static inline enum net_verdict process_icmpv4_pkt(struct net_pkt *pkt,
142
struct net_icmp_hdr hdr, *icmp_hdr;
143
144
icmp_hdr = net_icmpv4_get_hdr(pkt, &hdr);
145
+ if (!icmp_hdr) {
146
+ NET_DBG("NULL ICMPv4 header - dropping");
147
+ return NET_DROP;
148
+ }
149
150
NET_DBG("ICMPv4 packet received type %d code %d",
151
icmp_hdr->type, icmp_hdr->code);
0 commit comments