summaryrefslogtreecommitdiff
path: root/print-llc.c
diff options
context:
space:
mode:
Diffstat (limited to 'print-llc.c')
-rw-r--r--print-llc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/print-llc.c b/print-llc.c
index bca9b502..7f316c2e 100644
--- a/print-llc.c
+++ b/print-llc.c
@@ -358,6 +358,12 @@ llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen,
length + hdrlen));
if ((control & ~LLC_U_POLL) == LLC_XID) {
+ if (caplen < 2 || length < 2) {
+ ND_PRINT((ndo, "[|llc]"));
+ if (caplen > 0)
+ ND_DEFAULTPRINT((const u_char *)p, caplen);
+ return (hdrlen);
+ }
if (*p == LLC_XID_FI) {
ND_PRINT((ndo, ": %02x %02x", p[1], p[2]));
return (hdrlen);