WiFi: Properly parse bitmap sections (CID-1451085)

Compressed block acks, in the form of 256 bit bitmaps, are parsed
per 64 bit section. Scanning along a section needs to be done by
indexing this section, not the full 256 bits of the complete bitmap.

Change-Id: Id0e6a7299e14be1ad68dd1cf6d736123008854ac
Reviewed-on: https://code.wireshark.org/review/35440
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Jaap Keuter 2019-12-14 22:29:07 +01:00 committed by Anders Broman
parent 2f42fda600
commit 625b71bb30
1 changed files with 3 additions and 3 deletions

View File

@ -22973,13 +22973,13 @@ dissect_ieee80211_block_ack_details(tvbuff_t *tvb, packet_info *pinfo _U_,
ett_block_ack_bitmap);
for (i = 0; i < 256; i += 64) {
bmap = tvb_get_letoh64(tvb, offset + i/8);
for (f = i; f < i + 64; f++) {
for (f = 0; f < 64; f++) {
if (bmap & (G_GUINT64_CONSTANT(1) << f))
continue;
proto_tree_add_uint_format_value(ba_bitmap_tree,
hf_ieee80211_block_ack_bitmap_missing_frame,
tvb, offset + (f/8), 1, ssn + f, "%u",
(ssn + f) & 0x0fff);
tvb, offset + ((i + f)/8), 1, ssn + i + f, "%u",
(ssn + i + f) & 0x0fff);
}
}
offset += 32;