Fixes a heap overflow found with American Fuzzy Lop by Hanno Böck.
return (chdlc_if_print(ndo, h, p));
default:
+ if (caplen < 4) {
+ ND_PRINT((ndo, "[|ppp]"));
+ return (caplen);
+ }
+
if (ndo->ndo_eflag)
ND_PRINT((ndo, "%02x %02x %d ", p[0], p[1], length));
p += 2;
heap-overflow-2 heap-overflow-2.pcap heap-overflow-2.out -t -v -n
heapoverflow-atalk_print heapoverflow-atalk_print.pcap heapoverflow-atalk_print.out -t -v -n
heapoverflow-EXTRACT_16BITS heapoverflow-EXTRACT_16BITS.pcap heapoverflow-EXTRACT_16BITS.out -t -v -n
+heapoverflow-ppp_hdlc_if_print heapoverflow-ppp_hdlc_if_print.pcap heapoverflow-ppp_hdlc_if_print.out -t -v -n