diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2021-05-14 20:34:35 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2021-05-14 20:34:43 +0200 |
commit | d76dc9f90ab9c6188063696668b6f2e749df7911 (patch) | |
tree | d7c0fcb8f3b9a31648c83434514ada9a92d97d06 /print-802_15_4.c | |
parent | 346ea98e51a8d50acbbe010f4b39b098d34caa2f (diff) | |
download | tcpdump-d76dc9f90ab9c6188063696668b6f2e749df7911.tar.gz |
IEEE 802.15.4: Add a bounds check
This avoids to have cp (current pointer on packet data) > ndo->ndo_snapend
in hex_and_ascii_print(), via ndo_default_print(), via ND_DEFAULTPRINT(),
in some cases.
Diffstat (limited to 'print-802_15_4.c')
-rw-r--r-- | print-802_15_4.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/print-802_15_4.c b/print-802_15_4.c index 3d307ffd..5687d455 100644 --- a/print-802_15_4.c +++ b/print-802_15_4.c @@ -2021,6 +2021,7 @@ ieee802_15_4_std_frames(netdissect_options *ndo, if (len < 0) { return 0; } + ND_TCHECK_LEN(p, len); p += len; caplen -= len; } else { |