mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-10 01:23:48 +08:00
* Fix all uses of pbuf_header to check the return value. In some
cases just assert if it fails as I'm not sure how to fix them, but
this is no worse than before when they would carry on regardless
of the failure.
This commit is contained in:
@@ -803,7 +803,10 @@ snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr,
|
||||
/* suppress unused argument warning */
|
||||
if (arg);
|
||||
/* peek in the UDP header (goto IP payload) */
|
||||
pbuf_header(p, UDP_HLEN);
|
||||
if(pbuf_header(p, UDP_HLEN)){
|
||||
LWIP_ASSERT("Can't move to UDP header", 0);
|
||||
return;
|
||||
}
|
||||
udphdr = p->payload;
|
||||
|
||||
/* check if datagram is really directed at us (including broadcast requests) */
|
||||
|
||||
Reference in New Issue
Block a user