diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2023-04-27 13:19:34 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2023-04-27 13:32:26 +0200 |
commit | ef2869ecb72f85fbb452094b45fa53743a23d086 (patch) | |
tree | 2c4fc0737380e5928095e0b44c3db312dff2105f /print-ppp.c | |
parent | 07d67623862270c21a6f3556a25732e9f09b9f6a (diff) | |
download | tcpdump-ef2869ecb72f85fbb452094b45fa53743a23d086.tar.gz |
PPP: Check if there is some data to hexdump
This may avoid this error:
Dissector error: print_unknown_data() called with pointer past end of
packet
Add a test file showing the problem.
Diffstat (limited to 'print-ppp.c')
-rw-r--r-- | print-ppp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/print-ppp.c b/print-ppp.c index aba243dd..38505355 100644 --- a/print-ppp.c +++ b/print-ppp.c @@ -1131,7 +1131,7 @@ print_ipcp_config_options(netdissect_options *ndo, print_unknown_data(ndo, p + 2, "\n\t ", len - 2); break; } - if (ndo->ndo_vflag > 1) + if (ndo->ndo_vflag > 1 && ND_TTEST_LEN(p + 2, len - 2)) print_unknown_data(ndo, p + 2, "\n\t ", len - 2); /* exclude TLV header */ return len; |