RadioTap: skip present bits for vendor NS.

An error messages was shown when more than 1 present bits was set for a vendor NS because these bits were not skipped properly. Closes https://gitlab.com/wireshark/wireshark/-/issues/17047


(cherry picked from commit 96e31cb116)
This commit is contained in:
Teyut 2020-12-03 22:22:02 +00:00 committed by Guy Harris
parent 787e19080e
commit c2d9eb4cfd
1 changed files with 4 additions and 0 deletions

View File

@ -346,6 +346,7 @@ return_tlv:
}
if (!align) {
/* skip all subsequent data */
int skip_size = IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE - (iterator->_arg_index % 32);
/* XXX - we should report an expert info here */
if (!iterator->_next_ns_data)
return -EINVAL;
@ -353,6 +354,9 @@ return_tlv:
/* give up on this namespace */
iterator->current_namespace = NULL;
iterator->_next_ns_data = NULL;
// Remove 1 because jump to next_entry will also shift bitmap by 1
iterator->_bitmap_shifter >>= skip_size - 1;
iterator->_arg_index += skip_size - 1;
/* XXX - we should report an expert info here */
if (!ITERATOR_VALID(iterator, 0))
return -EINVAL;