ieee80211: Fix Vendor Specific Fixed Field dissection.
authorRichard Sharpe <realrichardsharpe@gmail.com>
Sat, 10 Nov 2018 19:24:37 +0000 (11:24 -0800)
committerMichael Mann <mmann78@netscape.net>
Sat, 10 Nov 2018 22:47:09 +0000 (22:47 +0000)
Prevent malformed packet exceptions.

Bug: 15273
Change-Id: I88c8fe4bf19d1c8ef478068dde8c220afdd33589
Reviewed-on: https://code.wireshark.org/review/30565
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/dissectors/packet-ieee80211.c

index 150c4aa6d7645f1ec67c937bba292a0aaab44fb3..cb005a9bc93dee5682ca7bc522609753f5952de3 100644 (file)
@@ -10620,9 +10620,8 @@ add_ff_action_vendor_specific(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
   if (dissected <= 0)
   {
       call_data_dissector(vendor_tvb, pinfo, tree);
-      /* don't advance the dissector pointer as this will probably cause more malformed packets
-         if vendor is unknown. It also matches previous behavior (before dissection table implementation) */
-      dissected = 0;
+      /* Skip the whole TVB because we don't know its format */
+      dissected = tvb_reported_length_remaining(vendor_tvb, 0);
   }
 
   offset += dissected;