Text   |  XML   |  ReML   |   Visible Warnings:

Format String  at packet-ieee80211.c:4024

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

dissect_ht_capability_ie

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ieee80211.c)expand/collapse
Show more  
 3958  dissect_ht_capability_ie(proto_tree * tree, tvbuff_t * tvb, int offset,
 3959           guint32 tag_len, gboolean vs)
 3960  {
 3961    proto_item *cap_item;
 3962    proto_tree *cap_tree;
 3963    guint16 capability;
 3964    guint32 txbfcap;
 3965    guint32 tag_val_off = 0;
 3966   
 3967    if (tag_val_off + 2 > tag_len) {
 3968      proto_tree_add_string(tree, tag_interpretation, tvb, offset, tag_len,
 3969          "Not interpreted");
 3970      return;
 3971    }
 3972   
 3973    if (tag_len != 26) {
 3974      proto_tree_add_string(tree, tag_interpretation, tvb, offset, tag_len,
 3975                "HT Capabilities IE content length must be exactly 26 bytes");
 3976      return;
 3977    }
 3978   
 3979    if (wlan_ignore_draft_ht && vs)
 3980      return;
 3981   
 3982    /* 2 byte HT Capabilities  Info*/
 3983    capability = tvb_get_letohs (tvb, offset);
 3984    cap_item = proto_tree_add_item(tree, vs ? ht_vs_cap : ht_cap, tvb,
 3985                      offset, 2, TRUE);
 3986    cap_tree = proto_item_add_subtree(cap_item, ett_ht_cap_tree);
 3987    proto_tree_add_boolean(cap_tree, ht_ldpc_coding, tvb, offset, 1,
 3988               capability);
 3989    proto_tree_add_boolean(cap_tree, ht_chan_width, tvb, offset, 1,
 3990               capability);
 3991    proto_tree_add_uint(cap_tree, ht_sm_pwsave, tvb, offset, 1,
 3992               capability);
 3993    proto_tree_add_boolean(cap_tree, ht_green, tvb, offset, 1,
 3994               capability);
 3995    proto_tree_add_boolean(cap_tree, ht_short20, tvb, offset, 1,
 3996               capability);
 3997    proto_tree_add_boolean(cap_tree, ht_short40, tvb, offset, 1,
 3998               capability);
 3999    proto_tree_add_boolean(cap_tree, ht_tx_stbc, tvb, offset, 1,
 4000               capability);
 4001    proto_tree_add_uint(cap_tree, ht_rx_stbc, tvb, offset+1, 1,
 4002               capability);
 4003    proto_tree_add_boolean(cap_tree, ht_delayed_block_ack, tvb, offset+1, 1,
 4004               capability);
 4005    proto_tree_add_boolean(cap_tree, ht_max_amsdu, tvb, offset+1, 1,
 4006               capability);
 4007    proto_tree_add_boolean(cap_tree, ht_dss_cck_40, tvb, offset+1, 1,
 4008               capability);
 4009    proto_tree_add_boolean(cap_tree, ht_psmp, tvb, offset+1, 1,
 4010               capability);
 4011    proto_tree_add_boolean(cap_tree, ht_40_mhz_intolerant, tvb, offset+1, 1,
 4012               capability);
 4013    proto_tree_add_boolean(cap_tree, ht_l_sig, tvb, offset+1, 1,
 4014               capability);
 4015   
 4016    offset += 2;
 4017    tag_val_off += 2;
 4018   
 4019    /* 1 byte A-MPDU Parameters */
 4020    capability = tvb_get_guint8 (tvb, offset);
 4021    cap_item = proto_tree_add_item(tree, vs ? ampduparam_vs : ampduparam, tvb,
 4022                      offset, 1, TRUE);
 4023    cap_tree = proto_item_add_subtree(cap_item, ett_ampduparam_tree);
 4024    proto_tree_add_uint_format(cap_tree, ampduparam_mpdu, tvb, offset, 1, capability, decode_numeric_bitfield(capability, 0x03, 8,"Maximum Rx A-MPDU Length: %%04.0Lf [Bytes]"), pow(2,13+(capability & 0x3))-1);
 4025    proto_tree_add_uint(cap_tree, ampduparam_mpdu_start_spacing, tvb, offset, 1, capability);
 4026    proto_tree_add_uint(cap_tree, ampduparam_reserved, tvb, offset, 1, capability);
 4027    offset += 1;
 4028    tag_val_off += 1;
 4029   
 4030    /* 16 byte MCS set */
 4031    dissect_mcs_set(tree, tvb, offset, FALSE, vs);
 4032    offset += 16;
 4033    tag_val_off += 16;
 4034   
 4035    /* 2 byte HT Extended Capabilities */
 4036    capability = tvb_get_letohs (tvb, offset);
 4037    cap_item = proto_tree_add_item(tree, vs ? htex_vs_cap : htex_cap, tvb,
 4038                      offset, 2, TRUE);
 4039    cap_tree = proto_item_add_subtree(cap_item, ett_htex_cap_tree);
 4040    proto_tree_add_boolean(cap_tree, htex_pco, tvb, offset, 1,
 4041               capability);
 4042    proto_tree_add_uint(cap_tree, htex_transtime, tvb, offset, 1,
 4043               capability);
 4044    proto_tree_add_uint(cap_tree, htex_mcs, tvb, offset+1, 1,
 4045               capability);
 4046    proto_tree_add_boolean(cap_tree, htex_htc_support, tvb, offset+1, 1,
 4047               capability);
 4048    proto_tree_add_boolean(cap_tree, htex_rd_responder, tvb, offset+1, 1,
 4049               capability);
 4050   
 4051    offset += 2;
 4052    tag_val_off += 2;
 4053   
 4054    /* 4 byte TxBF capabilities */
 4055    txbfcap = tvb_get_letohl (tvb, offset);
 4056    cap_item = proto_tree_add_item(tree, vs ? txbf_vs : txbf, tvb,
 4057                      offset, 4, TRUE);
 4058    cap_tree = proto_item_add_subtree(cap_item, ett_txbf_tree);
 4059    proto_tree_add_boolean(cap_tree, txbf_cap, tvb, offset, 1,
 4060               txbfcap);
 4061    proto_tree_add_boolean(cap_tree, txbf_rcv_ssc, tvb, offset, 1,
 4062               txbfcap);
 4063    proto_tree_add_boolean(cap_tree, txbf_tx_ssc, tvb, offset, 1,
 4064               txbfcap);
 4065    proto_tree_add_boolean(cap_tree, txbf_rcv_ndp, tvb, offset, 1,
 4066               txbfcap);
 4067    proto_tree_add_boolean(cap_tree, txbf_tx_ndp, tvb, offset, 1,
 4068               txbfcap);
 4069    proto_tree_add_boolean(cap_tree, txbf_impl_txbf, tvb, offset, 1,
 4070               txbfcap);
 4071    proto_tree_add_uint(cap_tree, txbf_calib, tvb, offset, 1,
 4072               txbfcap);
 4073    proto_tree_add_boolean(cap_tree, txbf_expl_csi, tvb, offset+1, 1,
 4074               txbfcap);
 4075    proto_tree_add_boolean(cap_tree, txbf_expl_uncomp_fm, tvb, offset+1, 1,
 4076               txbfcap);
 4077    proto_tree_add_boolean(cap_tree, txbf_expl_comp_fm, tvb, offset+1, 1,
 4078               txbfcap);
 4079    proto_tree_add_uint(cap_tree, txbf_expl_bf_csi, tvb, offset+1, 1,
 4080               txbfcap);
 4081    proto_tree_add_uint(cap_tree, txbf_expl_uncomp_fm_feed, tvb, offset+1, 1,
 4082               txbfcap);
 4083    proto_tree_add_uint(cap_tree, txbf_expl_comp_fm_feed, tvb, offset+1, 2,
 4084               txbfcap);
 4085    proto_tree_add_uint(cap_tree, txbf_min_group, tvb, offset+2, 1,
 4086               txbfcap);
 4087    proto_tree_add_uint(cap_tree, txbf_csi_num_bf_ant, tvb, offset+2, 1,
 4088               txbfcap);
 4089    proto_tree_add_uint(cap_tree, txbf_uncomp_sm_bf_ant, tvb, offset+2, 1,
 4090               txbfcap);
 4091    proto_tree_add_uint(cap_tree, txbf_comp_sm_bf_ant, tvb, offset+2, 2,
 4092               txbfcap);
 4093    proto_tree_add_uint(cap_tree, txbf_csi_max_rows_bf, tvb, offset+3, 1,
 4094               txbfcap);
 4095    proto_tree_add_uint(cap_tree, txbf_chan_est, tvb, offset+3, 1,
 4096               txbfcap);
 4097    proto_tree_add_uint(cap_tree, txbf_resrv, tvb, offset+3, 1,
 4098               txbfcap);
 4099   
 4100    offset += 4;
 4101    tag_val_off += 4;
 4102   
 4103    /* 1 byte Antenna Selection (ASEL) capabilities */
 4104    capability = tvb_get_guint8 (tvb, offset);
 4105    cap_item = proto_tree_add_item(tree, vs ? antsel_vs : antsel, tvb,
 4106                      offset, 1, TRUE);
 4107    cap_tree = proto_item_add_subtree(cap_item, ett_antsel_tree);
 4108    proto_tree_add_boolean(cap_tree, antsel_b0, tvb, offset, 1,
 4109               capability);
 4110    proto_tree_add_boolean(cap_tree, antsel_b1, tvb, offset, 1,
 4111               capability);
 4112    proto_tree_add_boolean(cap_tree, antsel_b2, tvb, offset, 1,
 4113               capability);
 4114    proto_tree_add_boolean(cap_tree, antsel_b3, tvb, offset, 1,
 4115               capability);
 4116    proto_tree_add_boolean(cap_tree, antsel_b4, tvb, offset, 1,
 4117               capability);
 4118    proto_tree_add_boolean(cap_tree, antsel_b5, tvb, offset, 1,
 4119               capability);
 4120    proto_tree_add_boolean(cap_tree, antsel_b6, tvb, offset, 1,
 4121               capability);
 4122    proto_tree_add_uint(cap_tree, antsel_b7, tvb, offset, 1,
 4123               capability);
 4124   
 4125    offset += 1;
 4126    tag_val_off += 1;
 4127   
 4128    if (tag_val_off < tag_len)
 4129      proto_tree_add_string(tree, tag_interpretation, tvb, offset,
 4130          tag_len - tag_val_off, "Not interpreted");
 4131  }
Show more  




Change Warning 5573.35881 : Format String

Priority:
State:
Finding:
Owner:
Note: