summaryrefslogtreecommitdiff
path: root/print-802_11.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-08-02 10:48:50 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-08-02 10:58:16 +0200
commit627051ec20da08e6371673ca7b7d475af46c5630 (patch)
tree838d6e07304571d242bb6ed79d86bd208695c466 /print-802_11.c
parentdc8a38c2899c29b29c1893ae1eeab0e26a5a1ca6 (diff)
downloadtcpdump-627051ec20da08e6371673ca7b7d475af46c5630.tar.gz
IEEE 802.11: Update the link-layer header length in two steps (PRISM)
This way, even if we longjmped out of the code because trucation, the prism header length is subtracted for -x/-X print.
Diffstat (limited to 'print-802_11.c')
-rw-r--r--print-802_11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/print-802_11.c b/print-802_11.c
index 9c9e77cf..2992adc6 100644
--- a/print-802_11.c
+++ b/print-802_11.c
@@ -3489,7 +3489,8 @@ prism_if_print(netdissect_options *ndo,
p += PRISM_HDR_LEN;
length -= PRISM_HDR_LEN;
caplen -= PRISM_HDR_LEN;
- ndo->ndo_ll_hdr_len += PRISM_HDR_LEN + ieee802_11_print(ndo, p, length, caplen, 0, 0);
+ ndo->ndo_ll_hdr_len += PRISM_HDR_LEN;
+ ndo->ndo_ll_hdr_len += ieee802_11_print(ndo, p, length, caplen, 0, 0);
}
/*