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
This commit is contained in:
Teyut 2020-12-03 23:22:02 +01:00
parent 3c640ca04a
commit 96e31cb116
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;