ieee80211: use 64bit value string for a 64bit hf variable
authorMartin Kaiser <wireshark@kaiser.cx>
Sun, 25 Mar 2018 11:44:07 +0000 (13:44 +0200)
committerGuy Harris <guy@alum.mit.edu>
Sun, 25 Mar 2018 17:53:19 +0000 (17:53 +0000)
Using a 32bit value string triggers the assertion in
hf_try_val64_to_str().

Bug: 14560
Change-Id: Ief3f46ee60355f43d2fb5f210608fde21be8d41d
Reviewed-on: https://code.wireshark.org/review/26633
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
epan/dissectors/packet-ieee80211.c

index 6a85597ca29992ca88c8788c4b601a35f0f07b6f..2033364e2d26c2c4049e2df34a72e072fb79413b 100644 (file)
@@ -19813,7 +19813,7 @@ dissect_ieee80211_block_ack(tvbuff_t *tvb, packet_info *pinfo _U_,
 #define TRIGGER_TYPE_BQRP       6
 #define TRIGGER_TYPE_NFRP       7
 
-static const value_string trigger_type_vals[] = {
+static const val64_string trigger_type_vals[] = {
   { 0, "Basic" },
   { 1, "Beamforming Report Poll (BRP)" },
   { 2, "MU-BAR" },
@@ -20135,7 +20135,7 @@ dissect_ieee80211_he_trigger(tvbuff_t *tvb, packet_info *pinfo _U_,
 
   trigger_type = tvb_get_guint8(tvb, offset) & 0x0F;
   col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
-                val_to_str(trigger_type, trigger_type_vals, "Reserved"));
+                val64_to_str(trigger_type, trigger_type_vals, "Reserved"));
   /*
    * Deal with the common Info and then any user info after that.
    */
@@ -30309,7 +30309,7 @@ proto_register_ieee80211(void)
 
     {&hf_ieee80211_he_trigger_type,
      {"Trigger Type", "wlan.trigger.he.trigger_type",
-      FT_UINT64, BASE_DEC, VALS(trigger_type_vals),
+      FT_UINT64, BASE_DEC|BASE_VAL64_STRING, VALS64(trigger_type_vals),
         0x000000000000000F, NULL, HFILL }},
 
     {&hf_ieee80211_he_trigger_length,