mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-30 22:43:54 +08:00
Try to fix issues reported by coverity
This commit is contained in:
@@ -964,7 +964,10 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) {
|
||||
#endif /* PPP_PROTOCOLNAME */
|
||||
ppp_warn("Unsupported protocol 0x%x received", protocol);
|
||||
#endif /* PPP_DEBUG */
|
||||
pbuf_add_header(pb, sizeof(protocol));
|
||||
if (pbuf_add_header(pb, sizeof(protocol))) {
|
||||
PPPDEBUG(LOG_WARNING, ("ppp_input[%d]: Dropping (pbuf_add_header failed)\n", pcb->netif->num));
|
||||
goto drop;
|
||||
}
|
||||
lcp_sprotrej(pcb, (u8_t*)pb->payload, pb->len);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user