radiotap: Correct support for 0-length PSDUs.
When there is no data, which is indicated by the 0-length PDSU radiotap header, there is no more data to dissect, so don't dissect any more as that causes an exception. Change-Id: I284b8128ec309ba26f24a012380d311eb3e48697 Reviewed-on: https://code.wireshark.org/review/29529 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
017d61528e
commit
7573f7dab4
|
@ -209,7 +209,7 @@ enum ieee80211_radiotap_type {
|
|||
|
||||
/* not (yet) defined Radiotap present flag */
|
||||
/* Bit 25 and 28 are not defined (in binary : 0001 0010 0000 0000 0000 0000 0000 0000 */
|
||||
#define IEEE80211_RADIOTAP_NOTDEFINED 0x1A000000
|
||||
#define IEEE80211_RADIOTAP_NOTDEFINED 0x10000000
|
||||
|
||||
/* Channel flags. */
|
||||
/* 0x00000001 through 0x00000008 undefined (reserved?) */
|
||||
|
|
|
@ -1937,6 +1937,7 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* u
|
|||
gboolean rtap_ns_next;
|
||||
guint rtap_ns_offset;
|
||||
guint rtap_ns_offset_next;
|
||||
gboolean zero_length_psdu = FALSE;
|
||||
|
||||
/* our non-standard overrides */
|
||||
static struct radiotap_override overrides[] = {
|
||||
|
@ -2744,6 +2745,7 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* u
|
|||
break;
|
||||
case IEEE80211_RADIOTAP_0_LENGTH_PSDU:
|
||||
dissect_radiotap_0_length_psdu(tvb, pinfo, radiotap_tree, offset, &phdr);
|
||||
zero_length_psdu = TRUE;
|
||||
break;
|
||||
case IEEE80211_RADIOTAP_L_SIG:
|
||||
dissect_radiotap_l_sig(tvb, pinfo, radiotap_tree, offset);
|
||||
|
@ -2758,6 +2760,13 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* u
|
|||
proto_item_append_text(ti, " (malformed)");
|
||||
}
|
||||
|
||||
/*
|
||||
* Is there any more there?
|
||||
*/
|
||||
if (zero_length_psdu) {
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
hand_off_to_80211:
|
||||
/* Grab the rest of the frame. */
|
||||
next_tvb = tvb_new_subset_remaining(tvb, length);
|
||||
|
|
Loading…
Reference in New Issue