X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/aa3e54f594385ce7e1e319b0c84999e51192578b..6c8ef0eb86a39c277d1a43802dd8ea01b51cfb2a:/print-fr.c diff --git a/print-fr.c b/print-fr.c index 53f37f68..8a1a53a4 100644 --- a/print-fr.c +++ b/print-fr.c @@ -457,6 +457,10 @@ mfr_print(netdissect_options *ndo, */ ND_TCHECK2(*p, 4); /* minimum frame header length */ + if (length < 4) { + ND_PRINT((ndo, "Message too short (%u bytes)", length)); + return length; + } if ((p[0] & MFR_BEC_MASK) == MFR_CTRL_FRAME && p[1] == 0) { ND_PRINT((ndo, "FRF.16 Control, Flags [%s], %s, length %u",