(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ieee80211.c) |
| |
| 6069 | | | dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo, |
| 6070 | | | proto_tree * tree, gboolean , gint fcs_len, |
| 6071 | | | gboolean wlan_broken_fc, gboolean datapad, |
| 6072 | | | gboolean is_ht) |
| 6073 | | | { |
| 6074 | | | guint16 fcf, flags, frame_type_subtype, ctrl_fcf, ctrl_type_subtype; |
| 6075 | | | guint16 seq_control; |
| 6076 | | | guint32 seq_number, frag_number; |
| 6077 | | | gboolean more_frags; |
| 6078 | | | const guint8 *src = NULL; |
| 6079 | | | const guint8 *dst = NULL; |
| 6080 | | | const guint8 *bssid = NULL; |
| 6081 | | | proto_item *ti = NULL; |
| 6082 | | | proto_item *fcs_item = NULL; |
| 6083 | | | proto_item *cw_item = NULL; |
| 6084 | | | proto_item *hidden_item; |
| 6085 | | | proto_tree *volatile hdr_tree = NULL; |
| 6086 | | | proto_tree *fcs_tree = NULL; |
| 6087 | | | proto_tree *cw_tree = NULL; |
| 6088 | | | guint16 hdr_len, ohdr_len, htc_len = 0; |
| 6089 | | | gboolean has_fcs, fcs_good, fcs_bad; |
| 6090 | | | gint len, reported_len, ivlen; |
| 6091 | | | gboolean is_amsdu = 0; |
| 6092 | | | gboolean save_fragmented; |
| 6093 | | | tvbuff_t *volatile next_tvb = NULL; |
| 6094 | | | guint32 addr_type; |
| 6095 | | | volatile encap_t encap_type; |
| 6096 | | | guint8 octet1, octet2; |
| 6097 | | | char out_buff[SHORT_STR]; |
| 6098 | | | gint is_iv_bad; |
| 6099 | | | guchar iv_buff[4]; |
| 6100 | | | const char *addr1_str = NULL; |
| 6101 | | | int addr1_hf = -1; |
| 6102 | | | guint offset; |
| 6103 | | | const gchar *fts_str; |
| 6104 | | | gchar flag_str[] = "opmPRMFTC"; |
| 6105 | | | gint i; |
| 6106 | | | |
| 6107 | | | wlan_hdr *volatile whdr; |
| 6108 | | | static wlan_hdr whdrs[4]; |
| 6109 | | | gboolean retransmitted; |
| 6110 | | | |
| 6111 | | | whdr= &whdrs[0]; |
| 6112 | | | |
| 6113 | | | if (check_col (pinfo->cinfo, COL_PROTOCOL)) |
| 6114 | | | col_set_str (pinfo->cinfo, COL_PROTOCOL, "IEEE 802.11"); |
| 6115 | | | if (check_col (pinfo->cinfo, COL_INFO)) |
| 6116 | | | col_clear (pinfo->cinfo, COL_INFO); |
| 6117 | | | |
| 6118 | | | fcf = FETCH_FCF(0);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ieee80211.c |
| |
181 | #define FETCH_FCF(off) (wlan_broken_fc ? \ |
182 | BSWAP16(tvb_get_letohs(tvb, off)) : \ |
183 | tvb_get_letohs(tvb, off)) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/pint.h |
| |
105 | #define BSWAP16(x) \ |
106 | ((((x)&0xFF00)>>8) | \ |
107 | (((x)&0x00FF)<<8)) |
| |
|
| 6119 | | | frame_type_subtype = COMPOSE_FRAME_TYPE(fcf);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ieee80211.c |
| |
204 | #define COMPOSE_FRAME_TYPE(x) (((x & 0x0C)<< 2)+FCF_FRAME_SUBTYPE(x)) /* Create key to (sub)type */ |
| |
|
| 6120 | | | if (frame_type_subtype == CTRL_CONTROL_WRAPPER) |
| 6121 | | | ctrl_fcf = FETCH_FCF(10);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ieee80211.c |
| |
181 | #define FETCH_FCF(off) (wlan_broken_fc ? \ |
182 | BSWAP16(tvb_get_letohs(tvb, off)) : \ |
183 | tvb_get_letohs(tvb, off)) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/pint.h |
| |
105 | #define BSWAP16(x) \ |
106 | ((((x)&0xFF00)>>8) | \ |
107 | (((x)&0x00FF)<<8)) |
| |
|
| 6122 | | | else |
| 6123 | | | ctrl_fcf = 0; |
| 6124 | | | |
| 6125 | | | if () |
| 6126 | | | hdr_len = DATA_LONG_HDR_LEN; |
| 6127 | | | else |
| 6128 | | | hdr_len = (fcf, ctrl_fcf, is_ht); |
| 6129 | | | ohdr_len = hdr_len; |
| 6130 | | | if (datapad) |
| 6131 | | | hdr_len = roundup2(hdr_len, 4);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ieee80211.c |
| |
89 | #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ |
| |
|
| 6132 | | | |
| 6133 | | | fts_str = val_to_str(frame_type_subtype, frame_type_subtype_vals, |
| 6134 | | | "Unrecognized (Reserved frame)"); |
Ignored Return Value
The return value of val_to_str() is never checked in the highlighted execution scenario. - If the return value can indicate an error, the error will be ignored if the highlighted code executes.
- The return value of val_to_str() is checked 98% of the time in this project. CodeSonar is configured to enforce Ignored Return Value checks for any function whose return value is checked at least 96% of the time, unless the function is used fewer than 20 times. (To modify these thresholds, use configuration file parameters RETURN_CHECKER_SAMPLE_SIZE and RETURN_CHECKER_RATIO. To exempt val_to_str() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 6135 | | | if (check_col (pinfo->cinfo, COL_INFO)) |
Event 2:
Skipping " if". check_col(...) evaluates to false.
hide
|
|
| 6136 | | | col_set_str (pinfo->cinfo, COL_INFO, fts_str); |
| 6137 | | | |
| 6138 | | | |
| 6139 | | | flags = FCF_FLAGS (fcf); |
| 6140 | | | more_frags = HAVE_FRAGMENTS (flags); |
| 6141 | | | |
| 6142 | | | for (i = 0; i < 8; i++) { |
| 6143 | | | if (! (flags & 0x80 >> i)) { |
| 6144 | | | flag_str[i] = '.'; |
| 6145 | | | } |
| 6146 | | | } |
| 6147 | | | |
| 6148 | | | if (is_ht && IS_STRICTLY_ORDERED(flags) && |
Event 4:
Skipping " if". - is_ht evaluates to true.
- flags & 128 evaluates to true.
- (fcf & 12) >> 2 == 0 evaluates to false.
- (fcf & 12) >> 2 == 2 evaluates to false.
hide
|
|
| 6149 | | | ((FCF_FRAME_TYPE(fcf) == MGT_FRAME) || (FCF_FRAME_TYPE(fcf) == DATA_FRAME && |
| 6150 | | | DATA_FRAME_IS_QOS(frame_type_subtype)))) { |
| 6151 | | | htc_len = 4; |
| 6152 | | | } |
| 6153 | | | |
| 6154 | | | |
| 6155 | | | if (tree) |
Event 5:
Skipping " if". tree evaluates to false.
hide
|
|
| 6156 | | | { |
| 6157 | | | ti = proto_tree_add_protocol_format (tree, proto_wlan, tvb, 0, hdr_len, |
| 6158 | | | "IEEE 802.11 %s", fts_str); |
| 6159 | | | hdr_tree = proto_item_add_subtree (ti, ett_80211); |
| 6160 | | | |
| 6161 | | | dissect_frame_control(hdr_tree, tvb, wlan_broken_fc, 0); |
| 6162 | | | |
| 6163 | | | if (frame_type_subtype == CTRL_PS_POLL) |
| 6164 | | | proto_tree_add_uint(hdr_tree, hf_assoc_id,tvb,2,2, |
| 6165 | | | ASSOC_ID(tvb_get_letohs(tvb,2))); |
| 6166 | | | |
| 6167 | | | else |
| 6168 | | | proto_tree_add_uint (hdr_tree, hf_did_duration, tvb, 2, 2, |
| 6169 | | | tvb_get_letohs (tvb, 2)); |
| 6170 | | | } |
| 6171 | | | |
| 6172 | | | |
| 6173 | | | |
| 6174 | | | |
| 6175 | | | |
| 6176 | | | seq_control = 0; |
| 6177 | | | frag_number = 0; |
| 6178 | | | seq_number = 0; |
| 6179 | | | |
| 6180 | | | switch (FCF_FRAME_TYPE (fcf)) |
Event 6:
(fcf & 12) >> 2 evaluates to 2.
hide
|
|
| 6181 | | | { |
| 6182 | | | |
| 6183 | | | case MGT_FRAME: |
| 6184 | | | |
| 6185 | | | |
| 6186 | | | |
| 6187 | | | src = tvb_get_ptr (tvb, 10, 6); |
| 6188 | | | dst = tvb_get_ptr (tvb, 4, 6); |
| 6189 | | | |
| 6190 | | | SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, src);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6191 | | | SET_ADDRESS(&pinfo->src, AT_ETHER, 6, src);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6192 | | | SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, dst);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6193 | | | SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, dst);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6194 | | | |
| 6195 | | | |
| 6196 | | | SET_ADDRESS(&whdr->bssid, AT_ETHER, 6, tvb_get_ptr(tvb, 16,6));
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6197 | | | SET_ADDRESS(&whdr->src, AT_ETHER, 6, src);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6198 | | | SET_ADDRESS(&whdr->dst, AT_ETHER, 6, dst);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6199 | | | whdr->type = frame_type_subtype; |
| 6200 | | | |
| 6201 | | | seq_control = tvb_get_letohs(tvb, 22); |
| 6202 | | | frag_number = SEQCTL_FRAGMENT_NUMBER(seq_control); |
| 6203 | | | seq_number = SEQCTL_SEQUENCE_NUMBER(seq_control); |
| 6204 | | | |
| 6205 | | | if (check_col (pinfo->cinfo, COL_INFO)) |
| 6206 | | | { |
| 6207 | | | col_append_fstr(pinfo->cinfo, COL_INFO, |
| 6208 | | | ", SN=%d", seq_number); |
| 6209 | | | |
| 6210 | | | col_append_fstr(pinfo->cinfo, COL_INFO, |
| 6211 | | | ", FN=%d",frag_number); |
| 6212 | | | } |
| 6213 | | | |
| 6214 | | | if (tree) |
| 6215 | | | { |
| 6216 | | | proto_tree_add_ether (hdr_tree, hf_addr_da, tvb, 4, 6, dst); |
| 6217 | | | |
| 6218 | | | proto_tree_add_ether (hdr_tree, hf_addr_sa, tvb, 10, 6, src); |
| 6219 | | | |
| 6220 | | | |
| 6221 | | | hidden_item = proto_tree_add_ether (hdr_tree, hf_addr, tvb, 4, 6, dst); |
| 6222 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6223 | | | hidden_item = proto_tree_add_ether (hdr_tree, hf_addr, tvb, 10, 6, src); |
| 6224 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6225 | | | |
| 6226 | | | proto_tree_add_ether (hdr_tree, hf_addr_bssid, tvb, 16, 6, |
| 6227 | | | tvb_get_ptr (tvb, 16, 6)); |
| 6228 | | | |
| 6229 | | | proto_tree_add_uint (hdr_tree, hf_frag_number, tvb, 22, 2, |
| 6230 | | | frag_number); |
| 6231 | | | |
| 6232 | | | proto_tree_add_uint (hdr_tree, hf_seq_number, tvb, 22, 2, |
| 6233 | | | seq_number); |
| 6234 | | | } |
| 6235 | | | break; |
| 6236 | | | |
| 6237 | | | case CONTROL_FRAME: |
| 6238 | | | { |
| 6239 | | | |
| 6240 | | | |
| 6241 | | | |
| 6242 | | | |
| 6243 | | | |
| 6244 | | | if (frame_type_subtype == CTRL_CONTROL_WRAPPER) { |
| 6245 | | | offset = 10; |
| 6246 | | | ctrl_fcf = FETCH_FCF(10);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ieee80211.c |
| |
181 | #define FETCH_FCF(off) (wlan_broken_fc ? \ |
182 | BSWAP16(tvb_get_letohs(tvb, off)) : \ |
183 | tvb_get_letohs(tvb, off)) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/pint.h |
| |
105 | #define BSWAP16(x) \ |
106 | ((((x)&0xFF00)>>8) | \ |
107 | (((x)&0x00FF)<<8)) |
| |
|
| 6247 | | | ctrl_type_subtype = COMPOSE_FRAME_TYPE(ctrl_fcf);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ieee80211.c |
| |
204 | #define COMPOSE_FRAME_TYPE(x) (((x & 0x0C)<< 2)+FCF_FRAME_SUBTYPE(x)) /* Create key to (sub)type */ |
| |
|
| 6248 | | | } else { |
| 6249 | | | offset = 10; |
| 6250 | | | ctrl_fcf = fcf; |
| 6251 | | | ctrl_type_subtype = frame_type_subtype; |
| 6252 | | | } |
| 6253 | | | |
| 6254 | | | switch (ctrl_type_subtype) |
| 6255 | | | { |
| 6256 | | | case CTRL_PS_POLL: |
| 6257 | | | addr1_str = "BSSID"; |
| 6258 | | | addr1_hf = hf_addr_bssid; |
| 6259 | | | break; |
| 6260 | | | case CTRL_RTS: |
| 6261 | | | case CTRL_CTS: |
| 6262 | | | case CTRL_ACKNOWLEDGEMENT: |
| 6263 | | | case CTRL_CFP_END: |
| 6264 | | | case CTRL_CFP_ENDACK: |
| 6265 | | | case CTRL_BLOCK_ACK_REQ: |
| 6266 | | | case CTRL_BLOCK_ACK: |
| 6267 | | | addr1_str = "RA"; |
| 6268 | | | addr1_hf = hf_addr_ra; |
| 6269 | | | break; |
| 6270 | | | default: |
| 6271 | | | break; |
| 6272 | | | } |
| 6273 | | | |
| 6274 | | | if (!addr1_str) |
| 6275 | | | break; |
| 6276 | | | |
| 6277 | | | |
| 6278 | | | dst = tvb_get_ptr(tvb, 4, 6); |
| 6279 | | | set_dst_addr_cols(pinfo, dst, addr1_str); |
| 6280 | | | if (tree) { |
| 6281 | | | proto_tree_add_item(hdr_tree, addr1_hf, tvb, 4, 6, FALSE); |
| 6282 | | | } |
| 6283 | | | |
| 6284 | | | |
| 6285 | | | |
| 6286 | | | |
| 6287 | | | |
| 6288 | | | if (frame_type_subtype == CTRL_CONTROL_WRAPPER && tree) { |
| 6289 | | | cw_item = proto_tree_add_text(hdr_tree, tvb, offset, 2, |
| 6290 | | | "Contained Frame Control"); |
| 6291 | | | cw_tree = proto_item_add_subtree (cw_item, ett_cntrl_wrapper_fc); |
| 6292 | | | dissect_frame_control(cw_tree, tvb, FALSE, offset); |
| 6293 | | | dissect_ht_control(hdr_tree, tvb, offset + 2); |
| 6294 | | | offset+=6; |
| 6295 | | | cw_item = proto_tree_add_text(hdr_tree, tvb, offset, 2, |
| 6296 | | | "Carried Frame"); |
| 6297 | | | hdr_tree = proto_item_add_subtree (cw_item, ett_cntrl_wrapper_fc); |
| 6298 | | | } |
| 6299 | | | |
| 6300 | | | switch (ctrl_type_subtype) |
| 6301 | | | { |
| 6302 | | | case CTRL_PS_POLL: |
| 6303 | | | case CTRL_CFP_END: |
| 6304 | | | case CTRL_CFP_ENDACK: |
| 6305 | | | { |
| 6306 | | | src = tvb_get_ptr (tvb, offset, 6); |
| 6307 | | | set_src_addr_cols(pinfo, src, "BSSID"); |
| 6308 | | | if (tree) { |
| 6309 | | | proto_tree_add_item(hdr_tree, hf_addr_ta, tvb, offset, 6, FALSE); |
| 6310 | | | } |
| 6311 | | | break; |
| 6312 | | | } |
| 6313 | | | |
| 6314 | | | case CTRL_RTS: |
| 6315 | | | { |
| 6316 | | | src = tvb_get_ptr (tvb, offset, 6); |
| 6317 | | | set_src_addr_cols(pinfo, src, "TA"); |
| 6318 | | | if (tree) { |
| 6319 | | | proto_tree_add_item(hdr_tree, hf_addr_ta, tvb, offset, 6, FALSE); |
| 6320 | | | } |
| 6321 | | | break; |
| 6322 | | | } |
| 6323 | | | |
| 6324 | | | case CTRL_CONTROL_WRAPPER: |
| 6325 | | | { |
| 6326 | | | |
| 6327 | | | break; |
| 6328 | | | } |
| 6329 | | | |
| 6330 | | | |
| 6331 | | | case CTRL_BLOCK_ACK_REQ: |
| 6332 | | | { |
| 6333 | | | src = tvb_get_ptr (tvb, offset, 6); |
| 6334 | | | set_src_addr_cols(pinfo, src, "TA"); |
| 6335 | | | |
| 6336 | | | if (tree) |
| 6337 | | | { |
| 6338 | | | guint16 bar_control; |
| 6339 | | | guint8 block_ack_type; |
| 6340 | | | proto_item *bar_parent_item; |
| 6341 | | | proto_tree *bar_sub_tree; |
| 6342 | | | |
| 6343 | | | proto_tree_add_item(hdr_tree, hf_addr_ta, tvb, offset, 6, FALSE); |
| 6344 | | | offset += 6; |
| 6345 | | | |
| 6346 | | | bar_control = tvb_get_letohs(tvb, offset); |
| 6347 | | | block_ack_type = (bar_control & 0x0006) >> 1; |
| 6348 | | | proto_tree_add_uint(hdr_tree, hf_block_ack_request_type, tvb, |
| 6349 | | | offset, 1, block_ack_type); |
| 6350 | | | bar_parent_item = proto_tree_add_uint_format(hdr_tree, |
| 6351 | | | hf_block_ack_request_control, tvb, offset, 2, bar_control, |
| 6352 | | | "Block Ack Request (BAR) Control: 0x%04X", bar_control); |
| 6353 | | | bar_sub_tree = proto_item_add_subtree(bar_parent_item, |
| 6354 | | | ett_block_ack); |
| 6355 | | | proto_tree_add_boolean(bar_sub_tree, |
| 6356 | | | hf_block_ack_control_ack_policy, tvb, offset, 1, bar_control); |
| 6357 | | | proto_tree_add_boolean(bar_sub_tree, hf_block_ack_control_multi_tid, |
| 6358 | | | tvb, offset, 1, bar_control); |
| 6359 | | | proto_tree_add_boolean(bar_sub_tree, |
| 6360 | | | hf_block_ack_control_compressed_bitmap, tvb, offset, 1, |
| 6361 | | | bar_control); |
| 6362 | | | proto_tree_add_uint(bar_sub_tree, hf_block_ack_control_reserved, |
| 6363 | | | tvb, offset, 2, bar_control); |
| 6364 | | | |
| 6365 | | | switch (block_ack_type) |
| 6366 | | | { |
| 6367 | | | case 0: |
| 6368 | | | { |
| 6369 | | | proto_tree_add_uint(bar_sub_tree, |
| 6370 | | | hf_block_ack_control_basic_tid_info, tvb, offset+1, 1, |
| 6371 | | | bar_control); |
| 6372 | | | offset += 2; |
| 6373 | | | |
| 6374 | | | offset += add_fixed_field(hdr_tree, tvb, offset, |
| 6375 | | | FIELD_BLOCK_ACK_SSC); |
| 6376 | | | break; |
| 6377 | | | } |
| 6378 | | | case 2: |
| 6379 | | | { |
| 6380 | | | proto_tree_add_uint(bar_sub_tree, |
| 6381 | | | hf_block_ack_control_compressed_tid_info, tvb, offset+1, 1, |
| 6382 | | | bar_control); |
| 6383 | | | offset += 2; |
| 6384 | | | |
| 6385 | | | offset += add_fixed_field(hdr_tree, tvb, offset, |
| 6386 | | | FIELD_BLOCK_ACK_SSC); |
| 6387 | | | break; |
| 6388 | | | } |
| 6389 | | | case 3: |
| 6390 | | | { |
| 6391 | | | guint8 tid_count, i; |
| 6392 | | | proto_tree *bar_mtid_tree, *bar_mtid_sub_tree; |
| 6393 | | | |
| 6394 | | | tid_count = ((bar_control & 0xF000) >> 12) + 1; |
| 6395 | | | proto_tree_add_uint_format(bar_sub_tree, hf_block_ack_control_compressed_tid_info, tvb, offset+1, 1, bar_control, |
| 6396 | | | decode_numeric_bitfield(bar_control, 0xF000, 16,"Number of TIDs Present: 0x%%X"), tid_count); |
| 6397 | | | offset += 2; |
| 6398 | | | |
| 6399 | | | bar_parent_item = proto_tree_add_text (hdr_tree, tvb, offset, tid_count*4, "Per TID Info"); |
| 6400 | | | bar_mtid_tree = proto_item_add_subtree(bar_parent_item, ett_block_ack); |
| 6401 | | | for (i = 1; i <= tid_count; i++) { |
| 6402 | | | bar_parent_item = proto_tree_add_uint(bar_mtid_tree, hf_block_ack_multi_tid_info, tvb, offset, 4, i); |
| 6403 | | | bar_mtid_sub_tree = proto_item_add_subtree(bar_parent_item, ett_block_ack); |
| 6404 | | | |
| 6405 | | | bar_control = tvb_get_letohs(tvb, offset); |
| 6406 | | | proto_tree_add_uint(bar_mtid_sub_tree, hf_block_ack_multi_tid_reserved, tvb, offset, 2, bar_control); |
| 6407 | | | proto_tree_add_uint(bar_mtid_sub_tree, hf_block_ack_multi_tid_value, tvb, offset+1, 1, bar_control); |
| 6408 | | | offset += 2; |
| 6409 | | | |
| 6410 | | | offset += add_fixed_field(bar_mtid_sub_tree, tvb, offset, FIELD_BLOCK_ACK_SSC); |
| 6411 | | | } |
| 6412 | | | break; |
| 6413 | | | } |
| 6414 | | | } |
| 6415 | | | } |
| 6416 | | | break; |
| 6417 | | | } |
| 6418 | | | |
| 6419 | | | |
| 6420 | | | |
| 6421 | | | case CTRL_BLOCK_ACK: |
| 6422 | | | { |
| 6423 | | | src = tvb_get_ptr (tvb, offset, 6); |
| 6424 | | | set_src_addr_cols(pinfo, src, "TA"); |
| 6425 | | | |
| 6426 | | | if (tree) |
| 6427 | | | { |
| 6428 | | | guint16 ba_control; |
| 6429 | | | guint8 block_ack_type; |
| 6430 | | | proto_item *ba_parent_item; |
| 6431 | | | proto_tree *ba_sub_tree; |
| 6432 | | | |
| 6433 | | | proto_tree_add_item(hdr_tree, hf_addr_ta, tvb, offset, 6, FALSE); |
| 6434 | | | offset += 6; |
| 6435 | | | |
| 6436 | | | ba_control = tvb_get_letohs(tvb, offset); |
| 6437 | | | block_ack_type = (ba_control & 0x0006) >> 1; |
| 6438 | | | proto_tree_add_uint(hdr_tree, hf_block_ack_type, tvb, offset, 1, block_ack_type); |
| 6439 | | | ba_parent_item = proto_tree_add_uint_format(hdr_tree, |
| 6440 | | | hf_block_ack_control, tvb, offset, 2, ba_control, |
| 6441 | | | "Block Ack (BA) Control: 0x%04X", ba_control); |
| 6442 | | | ba_sub_tree = proto_item_add_subtree(ba_parent_item, ett_block_ack); |
| 6443 | | | proto_tree_add_boolean(ba_sub_tree, hf_block_ack_control_ack_policy, |
| 6444 | | | tvb, offset, 1, ba_control); |
| 6445 | | | proto_tree_add_boolean(ba_sub_tree, hf_block_ack_control_multi_tid, |
| 6446 | | | tvb, offset, 1, ba_control); |
| 6447 | | | proto_tree_add_boolean(ba_sub_tree, |
| 6448 | | | hf_block_ack_control_compressed_bitmap, tvb, offset, 1, |
| 6449 | | | ba_control); |
| 6450 | | | proto_tree_add_uint(ba_sub_tree, hf_block_ack_control_reserved, tvb, |
| 6451 | | | offset, 2, ba_control); |
| 6452 | | | |
| 6453 | | | switch (block_ack_type) |
| 6454 | | | { |
| 6455 | | | case 0: |
| 6456 | | | { |
| 6457 | | | proto_tree_add_uint(ba_sub_tree, |
| 6458 | | | hf_block_ack_control_basic_tid_info, tvb, offset+1, 1, |
| 6459 | | | ba_control); |
| 6460 | | | offset += 2; |
| 6461 | | | |
| 6462 | | | offset += add_fixed_field(hdr_tree, tvb, offset, FIELD_BLOCK_ACK_SSC); |
| 6463 | | | proto_tree_add_text(hdr_tree, tvb, offset, 128, "Block Ack Bitmap"); |
| 6464 | | | offset += 128; |
| 6465 | | | break; |
| 6466 | | | } |
| 6467 | | | case 2: |
| 6468 | | | { |
| 6469 | | | proto_tree_add_uint(ba_sub_tree, hf_block_ack_control_basic_tid_info, tvb, offset+1, 1, ba_control); |
| 6470 | | | offset += 2; |
| 6471 | | | |
| 6472 | | | offset += add_fixed_field(hdr_tree, tvb, offset, FIELD_BLOCK_ACK_SSC); |
| 6473 | | | proto_tree_add_text(hdr_tree, tvb, offset, 8, "Block Ack Bitmap"); |
| 6474 | | | offset += 8; |
| 6475 | | | break; |
| 6476 | | | } |
| 6477 | | | case 3: |
| 6478 | | | { |
| 6479 | | | guint8 tid_count, i; |
| 6480 | | | proto_tree *ba_mtid_tree, *ba_mtid_sub_tree; |
| 6481 | | | |
| 6482 | | | tid_count = ((ba_control & 0xF000) >> 12) + 1; |
| 6483 | | | proto_tree_add_uint_format(ba_sub_tree, |
| 6484 | | | hf_block_ack_control_compressed_tid_info, tvb, offset+1, 1, |
| 6485 | | | ba_control, decode_numeric_bitfield(ba_control, 0xF000, |
| 6486 | | | 16,"Number of TIDs Present: 0x%%X"), tid_count); |
| 6487 | | | offset += 2; |
| 6488 | | | |
| 6489 | | | ba_parent_item = proto_tree_add_text (hdr_tree, tvb, offset, tid_count*4, "Per TID Info"); |
| 6490 | | | ba_mtid_tree = proto_item_add_subtree(ba_parent_item, ett_block_ack); |
| 6491 | | | for (i=1; i<=tid_count; i++) { |
| 6492 | | | ba_parent_item = proto_tree_add_uint(ba_mtid_tree, hf_block_ack_multi_tid_info, tvb, offset, 4, i); |
| 6493 | | | ba_mtid_sub_tree = proto_item_add_subtree(ba_parent_item, ett_block_ack); |
| 6494 | | | |
| 6495 | | | ba_control = tvb_get_letohs(tvb, offset); |
| 6496 | | | proto_tree_add_uint(ba_mtid_sub_tree, hf_block_ack_multi_tid_reserved, tvb, offset, 2, ba_control); |
| 6497 | | | proto_tree_add_uint(ba_mtid_sub_tree, hf_block_ack_multi_tid_value, tvb, offset+1, 1, ba_control); |
| 6498 | | | offset += 2; |
| 6499 | | | |
| 6500 | | | offset += add_fixed_field(ba_mtid_sub_tree, tvb, offset, FIELD_BLOCK_ACK_SSC); |
| 6501 | | | proto_tree_add_text(ba_mtid_sub_tree, tvb, offset, 8, "Block Ack Bitmap"); |
| 6502 | | | offset += 8; |
| 6503 | | | } |
| 6504 | | | break; |
| 6505 | | | } |
| 6506 | | | } |
| 6507 | | | } |
| 6508 | | | break; |
| 6509 | | | } |
| 6510 | | | |
| 6511 | | | } |
| 6512 | | | break; |
| 6513 | | | } |
| 6514 | | | |
| 6515 | | | case DATA_FRAME: |
| 6516 | | | addr_type = FCF_ADDR_SELECTOR (fcf); |
| 6517 | | | |
| 6518 | | | |
| 6519 | | | switch (addr_type) |
Event 7:
addr_type evaluates to 0.
hide
|
|
| 6520 | | | { |
| 6521 | | | |
| 6522 | | | case DATA_ADDR_T1: |
| 6523 | | | src = tvb_get_ptr (tvb, 10, 6); |
| 6524 | | | dst = tvb_get_ptr (tvb, 4, 6); |
| 6525 | | | bssid = tvb_get_ptr (tvb, 16, 6); |
| 6526 | | | break; |
| 6527 | | | |
| 6528 | | | case DATA_ADDR_T2: |
| 6529 | | | src = tvb_get_ptr (tvb, 16, 6); |
| 6530 | | | dst = tvb_get_ptr (tvb, 4, 6); |
| 6531 | | | bssid = tvb_get_ptr (tvb, 10, 6); |
| 6532 | | | break; |
| 6533 | | | |
| 6534 | | | case DATA_ADDR_T3: |
| 6535 | | | src = tvb_get_ptr (tvb, 10, 6); |
| 6536 | | | dst = tvb_get_ptr (tvb, 16, 6); |
| 6537 | | | bssid = tvb_get_ptr (tvb, 4, 6); |
| 6538 | | | break; |
| 6539 | | | |
| 6540 | | | case DATA_ADDR_T4: |
| 6541 | | | src = tvb_get_ptr (tvb, 24, 6); |
| 6542 | | | dst = tvb_get_ptr (tvb, 16, 6); |
| 6543 | | | bssid = tvb_get_ptr (tvb, 16, 6); |
| 6544 | | | break; |
| 6545 | | | } |
| 6546 | | | |
| 6547 | | | SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, src);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6548 | | | SET_ADDRESS(&pinfo->src, AT_ETHER, 6, src);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6549 | | | SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, dst);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6550 | | | SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, dst);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6551 | | | |
| 6552 | | | |
| 6553 | | | |
| 6554 | | | SET_ADDRESS(&whdr->bssid, AT_ETHER, 6, bssid);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6555 | | | SET_ADDRESS(&whdr->src, AT_ETHER, 6, src);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6556 | | | SET_ADDRESS(&whdr->dst, AT_ETHER, 6, dst);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/address.h |
| |
66 | #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ |
67 | (addr)->type = (addr_type); \ |
68 | (addr)->len = (addr_len); \ |
69 | (addr)->data = (addr_data); \ |
70 | } |
| |
|
| 6557 | | | whdr->type = frame_type_subtype; |
| 6558 | | | |
| 6559 | | | seq_control = tvb_get_letohs(tvb, 22); |
| 6560 | | | frag_number = SEQCTL_FRAGMENT_NUMBER(seq_control); |
| 6561 | | | seq_number = SEQCTL_SEQUENCE_NUMBER(seq_control); |
| 6562 | | | |
| 6563 | | | if (check_col (pinfo->cinfo, COL_INFO)) |
Event 8:
Skipping " if". check_col(...) evaluates to false.
hide
|
|
| 6564 | | | { |
| 6565 | | | col_append_fstr(pinfo->cinfo, COL_INFO, |
| 6566 | | | ", SN=%d, FN=%d", seq_number,frag_number); |
| 6567 | | | } |
| 6568 | | | |
| 6569 | | | |
| 6570 | | | if (tree) |
Event 9:
Skipping " if". tree evaluates to false.
hide
|
|
| 6571 | | | { |
| 6572 | | | |
| 6573 | | | switch (addr_type) |
| 6574 | | | { |
| 6575 | | | |
| 6576 | | | case DATA_ADDR_T1: |
| 6577 | | | proto_tree_add_ether (hdr_tree, hf_addr_da, tvb, 4, 6, dst); |
| 6578 | | | proto_tree_add_ether (hdr_tree, hf_addr_sa, tvb, 10, 6, src); |
| 6579 | | | proto_tree_add_ether (hdr_tree, hf_addr_bssid, tvb, 16, 6, bssid); |
| 6580 | | | proto_tree_add_uint (hdr_tree, hf_frag_number, tvb, 22, 2, |
| 6581 | | | frag_number); |
| 6582 | | | proto_tree_add_uint (hdr_tree, hf_seq_number, tvb, 22, 2, |
| 6583 | | | seq_number); |
| 6584 | | | |
| 6585 | | | |
| 6586 | | | hidden_item = proto_tree_add_ether (hdr_tree, hf_addr, tvb, 4, 6, dst); |
| 6587 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6588 | | | hidden_item = proto_tree_add_ether (hdr_tree, hf_addr, tvb, 10, 6, src); |
| 6589 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6590 | | | break; |
| 6591 | | | |
| 6592 | | | case DATA_ADDR_T2: |
| 6593 | | | proto_tree_add_ether (hdr_tree, hf_addr_da, tvb, 4, 6, dst); |
| 6594 | | | proto_tree_add_ether (hdr_tree, hf_addr_bssid, tvb, 10, 6, bssid); |
| 6595 | | | proto_tree_add_ether (hdr_tree, hf_addr_sa, tvb, 16, 6, src); |
| 6596 | | | proto_tree_add_uint (hdr_tree, hf_frag_number, tvb, 22, 2, |
| 6597 | | | frag_number); |
| 6598 | | | proto_tree_add_uint (hdr_tree, hf_seq_number, tvb, 22, 2, |
| 6599 | | | seq_number); |
| 6600 | | | |
| 6601 | | | |
| 6602 | | | hidden_item = proto_tree_add_ether (hdr_tree, hf_addr, tvb, 4, 6, dst); |
| 6603 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6604 | | | hidden_item = proto_tree_add_ether (hdr_tree, hf_addr, tvb, 16, 6, src); |
| 6605 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6606 | | | break; |
| 6607 | | | |
| 6608 | | | case DATA_ADDR_T3: |
| 6609 | | | proto_tree_add_ether (hdr_tree, hf_addr_bssid, tvb, 4, 6, bssid); |
| 6610 | | | proto_tree_add_ether (hdr_tree, hf_addr_sa, tvb, 10, 6, src); |
| 6611 | | | proto_tree_add_ether (hdr_tree, hf_addr_da, tvb, 16, 6, dst); |
| 6612 | | | |
| 6613 | | | proto_tree_add_uint (hdr_tree, hf_frag_number, tvb, 22, 2, |
| 6614 | | | frag_number); |
| 6615 | | | proto_tree_add_uint (hdr_tree, hf_seq_number, tvb, 22, 2, |
| 6616 | | | seq_number); |
| 6617 | | | |
| 6618 | | | |
| 6619 | | | hidden_item = proto_tree_add_ether (hdr_tree, hf_addr, tvb, 10, 6, src); |
| 6620 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6621 | | | hidden_item = proto_tree_add_ether (hdr_tree, hf_addr, tvb, 16, 6, dst); |
| 6622 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6623 | | | break; |
| 6624 | | | |
| 6625 | | | case DATA_ADDR_T4: |
| 6626 | | | proto_tree_add_ether (hdr_tree, hf_addr_ra, tvb, 4, 6, |
| 6627 | | | tvb_get_ptr (tvb, 4, 6)); |
| 6628 | | | proto_tree_add_ether (hdr_tree, hf_addr_ta, tvb, 10, 6, |
| 6629 | | | tvb_get_ptr (tvb, 10, 6)); |
| 6630 | | | proto_tree_add_ether (hdr_tree, hf_addr_da, tvb, 16, 6, dst); |
| 6631 | | | proto_tree_add_uint (hdr_tree, hf_frag_number, tvb, 22, 2, |
| 6632 | | | frag_number); |
| 6633 | | | proto_tree_add_uint (hdr_tree, hf_seq_number, tvb, 22, 2, |
| 6634 | | | seq_number); |
| 6635 | | | proto_tree_add_ether (hdr_tree, hf_addr_sa, tvb, 24, 6, src); |
| 6636 | | | |
| 6637 | | | |
| 6638 | | | hidden_item = proto_tree_add_ether (hdr_tree, hf_addr, tvb, 16, 6, dst); |
| 6639 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6640 | | | hidden_item = proto_tree_add_ether (hdr_tree, hf_addr, tvb, 24, 6, src); |
| 6641 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6642 | | | break; |
| 6643 | | | } |
| 6644 | | | |
| 6645 | | | } |
| 6646 | | | break; |
| 6647 | | | } |
| 6648 | | | |
| 6649 | | | len = tvb_length_remaining(tvb, hdr_len); |
| 6650 | | | reported_len = tvb_reported_length_remaining(tvb, hdr_len); |
| 6651 | | | |
| 6652 | | | switch (fcs_len) |
Event 10:
fcs_len evaluates to 4.
hide
|
|
| 6653 | | | { |
| 6654 | | | case 0: |
| 6655 | | | has_fcs = FALSE; |
| 6656 | | | break; |
| 6657 | | | |
| 6658 | | | case 4: |
| 6659 | | | has_fcs = TRUE; |
Event 11:
!0 evaluates to true.
hide
|
|
| 6660 | | | break; |
| 6661 | | | |
| 6662 | | | default: |
| 6663 | | | has_fcs = wlan_check_fcs; |
| 6664 | | | break; |
| 6665 | | | } |
| 6666 | | | if (has_fcs) |
Event 12:
Taking true branch. has_fcs evaluates to true.
hide
|
|
| 6667 | | | { |
| 6668 | | | |
| 6669 | | | |
| 6670 | | | |
| 6671 | | | |
| 6672 | | | |
| 6673 | | | if (reported_len < 4) |
Event 13:
Skipping " if". reported_len < 4 evaluates to true.
hide
|
|
| 6674 | | | { |
| 6675 | | | |
| 6676 | | | |
| 6677 | | | |
| 6678 | | | |
| 6679 | | | |
| 6680 | | | ; |
| 6681 | | | } |
| 6682 | | | else if (len < reported_len) |
| 6683 | | | { |
| 6684 | | | |
| 6685 | | | |
| 6686 | | | |
| 6687 | | | |
| 6688 | | | |
| 6689 | | | |
| 6690 | | | |
| 6691 | | | |
| 6692 | | | reported_len -= 4; |
| 6693 | | | if (len > reported_len) |
| 6694 | | | len = reported_len; |
| 6695 | | | } |
| 6696 | | | else |
| 6697 | | | { |
| 6698 | | | |
| 6699 | | | |
| 6700 | | | |
| 6701 | | | |
| 6702 | | | len -= 4; |
| 6703 | | | reported_len -= 4; |
| 6704 | | | if (tree) |
| 6705 | | | { |
| 6706 | | | guint32 sent_fcs = tvb_get_ntohl(tvb, hdr_len + len); |
| 6707 | | | guint32 fcs; |
| 6708 | | | |
| 6709 | | | if (datapad) |
| 6710 | | | fcs = crc32_802_tvb_padded(tvb, ohdr_len, hdr_len, len); |
| 6711 | | | else |
| 6712 | | | fcs = crc32_802_tvb(tvb, hdr_len + len); |
| 6713 | | | if (fcs == sent_fcs) { |
| 6714 | | | fcs_good = TRUE; |
| 6715 | | | fcs_bad = FALSE; |
| 6716 | | | } else { |
| 6717 | | | fcs_good = FALSE; |
| 6718 | | | fcs_bad = TRUE; |
| 6719 | | | } |
| 6720 | | | |
| 6721 | | | if(fcs_good) { |
| 6722 | | | fcs_item = proto_tree_add_uint_format(hdr_tree, hf_fcs, tvb, |
| 6723 | | | hdr_len + len, 4, sent_fcs, |
| 6724 | | | "Frame check sequence: 0x%08x [correct]", sent_fcs); |
| 6725 | | | } else { |
| 6726 | | | fcs_item = proto_tree_add_uint_format(hdr_tree, hf_fcs, tvb, |
| 6727 | | | hdr_len + len, 4, sent_fcs, |
| 6728 | | | "Frame check sequence: 0x%08x [incorrect, should be 0x%08x]", |
| 6729 | | | sent_fcs, fcs); |
| 6730 | | | flag_str[8] = '.'; |
| 6731 | | | } |
| 6732 | | | |
| 6733 | | | proto_tree_set_appendix(hdr_tree, tvb, hdr_len + len, 4); |
| 6734 | | | |
| 6735 | | | fcs_tree = proto_item_add_subtree(fcs_item, ett_fcs); |
| 6736 | | | |
| 6737 | | | fcs_item = proto_tree_add_boolean(fcs_tree, |
| 6738 | | | hf_fcs_good, tvb, |
| 6739 | | | hdr_len + len, 4, |
| 6740 | | | fcs_good); |
| 6741 | | | PROTO_ITEM_SET_GENERATED(fcs_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
325 | #define PROTO_ITEM_SET_GENERATED(proto_item) \ |
326 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_GENERATED) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6742 | | | |
| 6743 | | | fcs_item = proto_tree_add_boolean(fcs_tree, |
| 6744 | | | hf_fcs_bad, tvb, |
| 6745 | | | hdr_len + len, 4, |
| 6746 | | | fcs_bad); |
| 6747 | | | PROTO_ITEM_SET_GENERATED(fcs_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
325 | #define PROTO_ITEM_SET_GENERATED(proto_item) \ |
326 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_GENERATED) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6748 | | | } |
| 6749 | | | } |
| 6750 | | | } else { |
| 6751 | | | flag_str[8] = '\0'; |
| 6752 | | | } |
| 6753 | | | |
| 6754 | | | proto_item_append_text(ti, ", Flags: %s", flag_str); |
| 6755 | | | if (check_col (pinfo->cinfo, COL_INFO)) |
Event 14:
Taking true branch. check_col(...) evaluates to true.
hide
|
|
| 6756 | | | col_append_fstr (pinfo->cinfo, COL_INFO, ", Flags=%s", flag_str); |
| 6757 | | | |
| 6758 | | | |
| 6759 | | | |
| 6760 | | | |
| 6761 | | | |
| 6762 | | | |
| 6763 | | | switch (FCF_FRAME_TYPE (fcf)) |
Event 15:
(fcf & 12) >> 2 evaluates to 0.
hide
|
|
| 6764 | | | { |
| 6765 | | | |
| 6766 | | | case MGT_FRAME: |
| 6767 | | | if (htc_len == 4) { |
Event 16:
Skipping " if". htc_len == 4 evaluates to false.
hide
|
|
| 6768 | | | dissect_ht_control(hdr_tree, tvb, ohdr_len - 4); |
| 6769 | | | } |
| 6770 | | | break; |
| 6771 | | | |
| 6772 | | | case DATA_FRAME: |
| 6773 | | | if (tree && DATA_FRAME_IS_QOS(frame_type_subtype)) |
| 6774 | | | { |
| 6775 | | | proto_item *qos_fields; |
| 6776 | | | proto_tree *qos_tree; |
| 6777 | | | |
| 6778 | | | guint16 qosoff; |
| 6779 | | | guint16 qos_control; |
| 6780 | | | guint16 qos_priority; |
| 6781 | | | guint16 qos_ack_policy; |
| 6782 | | | guint16 qos_amsdu_present; |
| 6783 | | | guint16 qos_eosp; |
| 6784 | | | guint16 qos_field_content; |
| 6785 | | | |
| 6786 | | | |
| 6787 | | | |
| 6788 | | | |
| 6789 | | | |
| 6790 | | | |
| 6791 | | | |
| 6792 | | | |
| 6793 | | | |
| 6794 | | | |
| 6795 | | | qosoff = ohdr_len - htc_len - 2; |
| 6796 | | | qos_fields = proto_tree_add_text(hdr_tree, tvb, qosoff, 2, |
| 6797 | | | "QoS Control"); |
| 6798 | | | qos_tree = proto_item_add_subtree (qos_fields, ett_qos_parameters); |
| 6799 | | | |
| 6800 | | | qos_control = tvb_get_letohs(tvb, qosoff + 0); |
| 6801 | | | qos_priority = QOS_PRIORITY(qos_control); |
| 6802 | | | qos_ack_policy = QOS_ACK_POLICY(qos_control); |
| 6803 | | | qos_amsdu_present = QOS_AMSDU_PRESENT(qos_control); |
| 6804 | | | qos_eosp = QOS_EOSP(qos_control); |
| 6805 | | | qos_field_content = QOS_FIELD_CONTENT(qos_control); |
| 6806 | | | |
| 6807 | | | proto_tree_add_uint_format (qos_tree, hf_qos_priority, tvb, |
| 6808 | | | qosoff, 1, qos_priority, |
| 6809 | | | "Priority: %d (%s) (%s)", |
| 6810 | | | qos_priority, qos_tags[qos_priority], qos_acs[qos_priority]); |
| 6811 | | | |
| 6812 | | | if (flags & FLAG_FROM_DS) { |
| 6813 | | | proto_tree_add_boolean (qos_tree, hf_qos_eosp, tvb, |
| 6814 | | | qosoff, 1, qos_control); |
| 6815 | | | } else { |
| 6816 | | | proto_tree_add_boolean (qos_tree, hf_qos_bit4, tvb, |
| 6817 | | | qosoff, 1, qos_control); |
| 6818 | | | } |
| 6819 | | | |
| 6820 | | | proto_tree_add_uint (qos_tree, hf_qos_ack_policy, tvb, qosoff, 1, |
| 6821 | | | qos_ack_policy); |
| 6822 | | | |
| 6823 | | | if (flags & FLAG_FROM_DS) { |
| 6824 | | | if (!DATA_FRAME_IS_NULL(frame_type_subtype)) { |
| 6825 | | | proto_tree_add_boolean(qos_tree, hf_qos_amsdu_present, tvb, |
| 6826 | | | qosoff, 1, qos_amsdu_present); |
| 6827 | | | is_amsdu = qos_amsdu_present; |
| 6828 | | | } |
| 6829 | | | if (DATA_FRAME_IS_CF_POLL(frame_type_subtype)) { |
| 6830 | | | |
| 6831 | | | if (qos_field_content == 0) { |
| 6832 | | | proto_tree_add_uint_format_value (qos_tree, hf_qos_txop_limit, tvb, |
| 6833 | | | qosoff + 1, 1, qos_field_content, |
| 6834 | | | "transmit one frame immediately (0)"); |
| 6835 | | | } else { |
| 6836 | | | proto_tree_add_uint (qos_tree, hf_qos_txop_limit, tvb, |
| 6837 | | | qosoff + 1, 1, qos_field_content); |
| 6838 | | | } |
| 6839 | | | } else { |
| 6840 | | | |
| 6841 | | | proto_item *qos_ps_buf_state_fields; |
| 6842 | | | proto_tree *qos_ps_buf_state_tree; |
| 6843 | | | guint8 qap_buf_load; |
| 6844 | | | |
| 6845 | | | qos_ps_buf_state_fields = proto_tree_add_text(qos_tree, tvb, qosoff + 1, 1, |
| 6846 | | | "QAP PS Buffer State: 0x%x", qos_field_content); |
| 6847 | | | qos_ps_buf_state_tree = proto_item_add_subtree (qos_ps_buf_state_fields, ett_qos_ps_buf_state); |
| 6848 | | | |
| 6849 | | | proto_tree_add_boolean (qos_ps_buf_state_tree, hf_qos_buf_state_indicated, |
| 6850 | | | tvb, 1, 1, qos_field_content); |
| 6851 | | | |
| 6852 | | | if (QOS_PS_BUF_STATE_INDICATED(qos_field_content)) { |
| 6853 | | | proto_tree_add_uint (qos_ps_buf_state_tree, hf_qos_highest_pri_buf_ac, tvb, |
| 6854 | | | qosoff + 1, 1, qos_field_content); |
| 6855 | | | |
| 6856 | | | qap_buf_load = QOS_PS_QAP_BUF_LOAD(qos_field_content); |
| 6857 | | | switch (qap_buf_load) { |
| 6858 | | | |
| 6859 | | | case 0: |
| 6860 | | | proto_tree_add_uint_format_value (qos_ps_buf_state_tree, hf_qos_qap_buf_load, tvb, |
| 6861 | | | qosoff + 1, 1, qos_field_content, |
| 6862 | | | "no buffered traffic (0)"); |
| 6863 | | | break; |
| 6864 | | | |
| 6865 | | | default: |
| 6866 | | | proto_tree_add_uint_format_value (qos_ps_buf_state_tree, hf_qos_qap_buf_load, tvb, |
| 6867 | | | qosoff + 1, 1, qos_field_content, |
| 6868 | | | "%d octets (%d)", qap_buf_load*4096, qap_buf_load); |
| 6869 | | | break; |
| 6870 | | | |
| 6871 | | | case 15: |
| 6872 | | | proto_tree_add_uint_format_value (qos_ps_buf_state_tree, hf_qos_qap_buf_load, tvb, |
| 6873 | | | qosoff + 1, 1, qos_field_content, |
| 6874 | | | "greater than 57344 octets (15)"); |
| 6875 | | | break; |
| 6876 | | | } |
| 6877 | | | } |
| 6878 | | | } |
| 6879 | | | } else { |
| 6880 | | | if (!DATA_FRAME_IS_NULL(frame_type_subtype)) { |
| 6881 | | | proto_tree_add_boolean(qos_tree, hf_qos_amsdu_present, tvb, |
| 6882 | | | qosoff, 1, qos_amsdu_present); |
| 6883 | | | is_amsdu = qos_amsdu_present; |
| 6884 | | | } |
| 6885 | | | if (qos_eosp) { |
| 6886 | | | |
| 6887 | | | switch (qos_field_content) { |
| 6888 | | | |
| 6889 | | | case 0: |
| 6890 | | | proto_tree_add_uint_format_value (qos_tree, hf_qos_queue_size, |
| 6891 | | | tvb, qosoff + 1, 1, qos_field_content, |
| 6892 | | | "no buffered traffic in the queue (0)"); |
| 6893 | | | break; |
| 6894 | | | |
| 6895 | | | default: |
| 6896 | | | proto_tree_add_uint_format_value (qos_tree, hf_qos_queue_size, |
| 6897 | | | tvb, qosoff + 1, 1, qos_field_content, |
| 6898 | | | "%u bytes (%u)", qos_field_content*256, qos_field_content); |
| 6899 | | | break; |
| 6900 | | | |
| 6901 | | | case 254: |
| 6902 | | | proto_tree_add_uint_format_value (qos_tree, hf_qos_queue_size, |
| 6903 | | | tvb, qosoff + 1, 1, qos_field_content, |
| 6904 | | | "more than 64768 octets (254)"); |
| 6905 | | | break; |
| 6906 | | | |
| 6907 | | | case 255: |
| 6908 | | | proto_tree_add_uint_format_value (qos_tree, hf_qos_queue_size, |
| 6909 | | | tvb, qosoff + 1, 1, qos_field_content, |
| 6910 | | | "unspecified or unknown (256)"); |
| 6911 | | | break; |
| 6912 | | | } |
| 6913 | | | } else { |
| 6914 | | | |
| 6915 | | | if (qos_field_content == 0) { |
| 6916 | | | proto_tree_add_uint_format_value (qos_tree, hf_qos_txop_dur_req, |
| 6917 | | | tvb, qosoff + 1, 1, qos_field_content, |
| 6918 | | | "no TXOP requested (0)"); |
| 6919 | | | } else { |
| 6920 | | | proto_tree_add_uint (qos_tree, hf_qos_txop_dur_req, |
| 6921 | | | tvb, qosoff + 1, 1, qos_field_content); |
| 6922 | | | } |
| 6923 | | | } |
| 6924 | | | } |
| 6925 | | | |
| 6926 | | | |
| 6927 | | | if (htc_len == 4) { |
| 6928 | | | dissect_ht_control(hdr_tree, tvb, ohdr_len - 4); |
| 6929 | | | } |
| 6930 | | | } |
| 6931 | | | |
| 6932 | | | #ifdef HAVE_AIRPDCAP |
| 6933 | | | |
| 6934 | | | |
| 6935 | | | |
| 6936 | | | if (enable_decryption && !pinfo->fd->flags.visited) { |
| 6937 | | | const guint8 *enc_data = tvb_get_ptr(tvb, 0, hdr_len+reported_len); |
| 6938 | | | AirPDcapPacketProcess(&airpdcap_ctx, enc_data, hdr_len, hdr_len+reported_len, NULL, 0, NULL, TRUE, FALSE); |
| 6939 | | | } |
| 6940 | | | |
| 6941 | | | #endif |
| 6942 | | | |
| 6943 | | | |
| 6944 | | | |
| 6945 | | | |
| 6946 | | | if (DATA_FRAME_IS_NULL(frame_type_subtype)) |
| 6947 | | | return; |
| 6948 | | | |
| 6949 | | | if (!wlan_subdissector) { |
| 6950 | | | guint fnum = 0; |
| 6951 | | | |
| 6952 | | | |
| 6953 | | | |
| 6954 | | | |
| 6955 | | | retransmitted = FALSE; |
| 6956 | | | if(!pinfo->fd->flags.visited){ |
| 6957 | | | retransmit_key key; |
| 6958 | | | retransmit_key *result; |
| 6959 | | | |
| 6960 | | | memcpy(key.bssid, bssid, 6); |
| 6961 | | | memcpy(key.src, src, 6); |
| 6962 | | | key.seq_control = 0; |
| 6963 | | | result = (retransmit_key *)g_hash_table_lookup(fc_analyse_retransmit_table, &key); |
| 6964 | | | if (result && result->seq_control == seq_control) { |
| 6965 | | | |
| 6966 | | | fnum = result->fnum; |
| 6967 | | | g_hash_table_insert(fc_first_frame_table, GINT_TO_POINTER( pinfo->fd->num), |
| 6968 | | | GINT_TO_POINTER(fnum)); |
| 6969 | | | retransmitted = TRUE; |
| 6970 | | | } else { |
| 6971 | | | |
| 6972 | | | if (!result) { |
| 6973 | | | result = se_alloc(sizeof(retransmit_key)); |
| 6974 | | | *result = key; |
| 6975 | | | g_hash_table_insert(fc_analyse_retransmit_table, result, result); |
| 6976 | | | } |
| 6977 | | | result->seq_control = seq_control; |
| 6978 | | | result->fnum = pinfo->fd->num; |
| 6979 | | | } |
| 6980 | | | } |
| 6981 | | | else if ((fnum = GPOINTER_TO_UINT(g_hash_table_lookup(fc_first_frame_table, GINT_TO_POINTER( pinfo->fd->num))))) { |
| 6982 | | | retransmitted = TRUE; |
| 6983 | | | } |
| 6984 | | | |
| 6985 | | | if (retransmitted) { |
| 6986 | | | if (check_col (pinfo->cinfo, COL_INFO)) |
| 6987 | | | col_append_fstr(pinfo->cinfo, COL_INFO, " [retransmitted]"); |
| 6988 | | | if (tree) { |
| 6989 | | | proto_item *item; |
| 6990 | | | |
| 6991 | | | item=proto_tree_add_none_format(hdr_tree, hf_fc_analysis_retransmission, tvb, 0, 0, "Retransmitted frame"); |
| 6992 | | | PROTO_ITEM_SET_GENERATED(item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
325 | #define PROTO_ITEM_SET_GENERATED(proto_item) \ |
326 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_GENERATED) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6993 | | | item=proto_tree_add_uint(hdr_tree, hf_fc_analysis_retransmission_frame,tvb, 0, 0, fnum); |
| 6994 | | | PROTO_ITEM_SET_GENERATED(item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
325 | #define PROTO_ITEM_SET_GENERATED(proto_item) \ |
326 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_GENERATED) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 6995 | | | } |
| 6996 | | | next_tvb = tvb_new_subset (tvb, hdr_len, len, reported_len); |
| 6997 | | | call_dissector(data_handle, next_tvb, pinfo, tree); |
| 6998 | | | goto end_of_wlan; |
| 6999 | | | } |
| 7000 | | | } |
| 7001 | | | |
| 7002 | | | break; |
| 7003 | | | |
| 7004 | | | case CONTROL_FRAME: |
| 7005 | | | return; |
| 7006 | | | |
| 7007 | | | default: |
| 7008 | | | return; |
| 7009 | | | } |
| 7010 | | | |
| 7011 | | | if (IS_PROTECTED(FCF_FLAGS(fcf)) && wlan_ignore_wep != WLAN_IGNORE_WEP_WO_IV) { |
| 7012 | | | |
| 7013 | | | |
| 7014 | | | |
| 7015 | | | |
| 7016 | | | |
| 7017 | | | gboolean can_decrypt = FALSE; |
| 7018 | | | proto_tree *wep_tree = NULL; |
| 7019 | | | guint32 iv; |
| 7020 | | | guint8 key, keybyte; |
| 7021 | | | |
| 7022 | | | |
| 7023 | | | #ifdef HAVE_AIRPDCAP |
| 7024 | | | #define PROTECTION_ALG_TKIP AIRPDCAP_KEY_TYPE_TKIP |
| 7025 | | | #define PROTECTION_ALG_CCMP AIRPDCAP_KEY_TYPE_CCMP |
| 7026 | | | #define PROTECTION_ALG_WEP AIRPDCAP_KEY_TYPE_WEP |
| 7027 | | | #define PROTECTION_ALG_RSNA PROTECTION_ALG_CCMP | PROTECTION_ALG_TKIP |
| 7028 | | | #else |
| 7029 | | | #define PROTECTION_ALG_WEP 0 |
| 7030 | | | #define PROTECTION_ALG_TKIP 1 |
| 7031 | | | #define PROTECTION_ALG_CCMP 2 |
| 7032 | | | #define PROTECTION_ALG_RSNA PROTECTION_ALG_CCMP | PROTECTION_ALG_TKIP |
| 7033 | | | #endif |
| 7034 | | | guint8 algorithm=G_MAXUINT8;
x /usr/include/glib-2.0/glib/gtypes.h |
| |
64 | #define G_MAXUINT8 ((guint8) 0xff) |
| |
|
| 7035 | | | |
| 7036 | | | |
| 7037 | | | #define IS_TKIP(tvb, hdr_len) (tvb_get_guint8(tvb, hdr_len + 1) & 0x20) |
| 7038 | | | #define IS_CCMP(tvb, hdr_len) (tvb_get_guint8(tvb, hdr_len + 2) == 0) |
| 7039 | | | |
| 7040 | | | |
| 7041 | | | #ifdef HAVE_AIRPDCAP |
| 7042 | | | |
| 7043 | | | |
| 7044 | | | guint32 =0; |
| 7045 | | | guint32 sec_trailer=0; |
| 7046 | | | |
| 7047 | | | next_tvb = try_decrypt(tvb, hdr_len, reported_len, &algorithm, &, &sec_trailer); |
| 7048 | | | #endif |
| 7049 | | | |
| 7050 | | | |
| 7051 | | | keybyte = tvb_get_guint8(tvb, hdr_len + 3); |
| 7052 | | | key = KEY_OCTET_WEP_KEY(keybyte); |
| 7053 | | | if ((keybyte & KEY_EXTIV) && (len >= EXTIV_LEN)) { |
| 7054 | | | |
| 7055 | | | |
| 7056 | | | |
| 7057 | | | if (tree) { |
| 7058 | | | proto_item *extiv_fields; |
| 7059 | | | |
| 7060 | | | #ifdef HAVE_AIRPDCAP |
| 7061 | | | |
| 7062 | | | |
| 7063 | | | if (algorithm==PROTECTION_ALG_TKIP) |
| 7064 | | | extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8, |
| 7065 | | | "TKIP parameters"); |
| 7066 | | | else if (algorithm==PROTECTION_ALG_CCMP) |
| 7067 | | | extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8, |
| 7068 | | | "CCMP parameters"); |
| 7069 | | | else { |
| 7070 | | | |
| 7071 | | | #endif |
| 7072 | | | |
| 7073 | | | |
| 7074 | | | if (IS_TKIP(tvb, hdr_len)) { |
| 7075 | | | algorithm=PROTECTION_ALG_TKIP; |
| 7076 | | | extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8, |
| 7077 | | | "TKIP parameters"); |
| 7078 | | | } else if (IS_CCMP(tvb, hdr_len)) { |
| 7079 | | | algorithm=PROTECTION_ALG_CCMP; |
| 7080 | | | extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8, |
| 7081 | | | "CCMP parameters"); |
| 7082 | | | } else |
| 7083 | | | extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8, |
| 7084 | | | "TKIP/CCMP parameters"); |
| 7085 | | | #ifdef HAVE_AIRPDCAP |
| 7086 | | | } |
| 7087 | | | #endif |
| 7088 | | | proto_item_set_len (ti, hdr_len + 8); |
| 7089 | | | |
| 7090 | | | wep_tree = proto_item_add_subtree (extiv_fields, ett_wep_parameters); |
| 7091 | | | |
| 7092 | | | if (algorithm==PROTECTION_ALG_TKIP) { |
| 7093 | | | g_snprintf(out_buff, SHORT_STR, "0x%08X%02X%02X", |
| 7094 | | | tvb_get_letohl(tvb, hdr_len + 4), |
| 7095 | | | tvb_get_guint8(tvb, hdr_len), |
| 7096 | | | tvb_get_guint8(tvb, hdr_len + 2)); |
| 7097 | | | proto_tree_add_string(wep_tree, hf_tkip_extiv, tvb, hdr_len, |
| 7098 | | | EXTIV_LEN, out_buff); |
| 7099 | | | } else if (algorithm==PROTECTION_ALG_CCMP) { |
| 7100 | | | g_snprintf(out_buff, SHORT_STR, "0x%08X%02X%02X", |
| 7101 | | | tvb_get_letohl(tvb, hdr_len + 4), |
| 7102 | | | tvb_get_guint8(tvb, hdr_len + 1), |
| 7103 | | | tvb_get_guint8(tvb, hdr_len)); |
| 7104 | | | proto_tree_add_string(wep_tree, hf_ccmp_extiv, tvb, hdr_len, |
| 7105 | | | EXTIV_LEN, out_buff); |
| 7106 | | | } |
| 7107 | | | |
| 7108 | | | proto_tree_add_uint(wep_tree, hf_wep_key, tvb, hdr_len + 3, 1, key); |
| 7109 | | | } |
| 7110 | | | |
| 7111 | | | |
| 7112 | | | len -= EXTIV_LEN; |
| 7113 | | | reported_len -= EXTIV_LEN; |
| 7114 | | | ivlen = EXTIV_LEN; |
| 7115 | | | |
| 7116 | | | |
| 7117 | | | |
| 7118 | | | #ifdef HAVE_AIRPDCAP |
| 7119 | | | |
| 7120 | | | |
| 7121 | | | if (next_tvb!=NULL) { |
| 7122 | | | if (reported_len < (gint) sec_trailer) { |
| 7123 | | | |
| 7124 | | | ; |
| 7125 | | | } else if (len < reported_len) { |
| 7126 | | | |
| 7127 | | | |
| 7128 | | | reported_len -= sec_trailer; |
| 7129 | | | if (len > reported_len) |
| 7130 | | | len = reported_len; |
| 7131 | | | } else { |
| 7132 | | | |
| 7133 | | | |
| 7134 | | | |
| 7135 | | | len -= sec_trailer; |
| 7136 | | | reported_len -= sec_trailer; |
| 7137 | | | can_decrypt = TRUE; |
| 7138 | | | } |
| 7139 | | | } |
| 7140 | | | |
| 7141 | | | #endif |
| 7142 | | | } else { |
| 7143 | | | |
| 7144 | | | |
| 7145 | | | |
| 7146 | | | |
| 7147 | | | |
| 7148 | | | |
| 7149 | | | |
| 7150 | | | |
| 7151 | | | |
| 7152 | | | iv = tvb_get_ntoh24(tvb, hdr_len); |
| 7153 | | | if (tree) { |
Event 19:
Skipping " if". tree evaluates to false.
hide
|
|
| 7154 | | | proto_item *wep_fields; |
| 7155 | | | |
| 7156 | | | wep_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 4, |
| 7157 | | | "WEP parameters"); |
| 7158 | | | |
| 7159 | | | wep_tree = proto_item_add_subtree (wep_fields, ett_wep_parameters); |
| 7160 | | | proto_tree_add_uint (wep_tree, hf_wep_iv, tvb, hdr_len, 3, iv); |
| 7161 | | | tvb_memcpy(tvb, iv_buff, hdr_len, 3); |
| 7162 | | | is_iv_bad = weak_iv(iv_buff); |
| 7163 | | | if (is_iv_bad != -1) { |
| 7164 | | | proto_tree_add_boolean_format (wep_tree, hf_wep_iv_weak, |
| 7165 | | | tvb, 0, 0, TRUE, |
| 7166 | | | "Weak IV for key byte %d", |
| 7167 | | | is_iv_bad); |
| 7168 | | | } |
| 7169 | | | } |
| 7170 | | | if (tree) |
Event 20:
Skipping " if". tree evaluates to false.
hide
|
|
| 7171 | | | proto_tree_add_uint (wep_tree, hf_wep_key, tvb, hdr_len + 3, 1, key); |
| 7172 | | | |
| 7173 | | | |
| 7174 | | | len -= 4; |
| 7175 | | | reported_len -= 4; |
| 7176 | | | ivlen = 4; |
| 7177 | | | |
| 7178 | | | |
| 7179 | | | |
| 7180 | | | algorithm=PROTECTION_ALG_WEP; |
| 7181 | | | |
| 7182 | | | |
| 7183 | | | |
| 7184 | | | |
| 7185 | | | |
| 7186 | | | |
| 7187 | | | if (reported_len < 4) { |
Event 21:
Skipping " if". reported_len < 4 evaluates to true.
hide
|
|
| 7188 | | | |
| 7189 | | | |
| 7190 | | | |
| 7191 | | | |
| 7192 | | | |
| 7193 | | | ; |
| 7194 | | | } else if (len < reported_len) { |
| 7195 | | | |
| 7196 | | | |
| 7197 | | | |
| 7198 | | | |
| 7199 | | | |
| 7200 | | | |
| 7201 | | | |
| 7202 | | | |
| 7203 | | | reported_len -= 4; |
| 7204 | | | if (len > reported_len) |
| 7205 | | | len = reported_len; |
| 7206 | | | } else { |
| 7207 | | | |
| 7208 | | | |
| 7209 | | | |
| 7210 | | | |
| 7211 | | | |
| 7212 | | | |
| 7213 | | | |
| 7214 | | | |
| 7215 | | | |
| 7216 | | | len -= 4; |
| 7217 | | | reported_len -= 4; |
| 7218 | | | can_decrypt = TRUE; |
| 7219 | | | } |
| 7220 | | | } |
| 7221 | | | |
| 7222 | | | if (algorithm == PROTECTION_ALG_WEP) { |
Event 22:
Taking true branch. algorithm == 0 evaluates to true.
hide
|
|
| 7223 | | | g_strlcpy (wlan_stats.protection, "WEP", MAX_PROTECT_LEN); |
| 7224 | | | } else if (algorithm == PROTECTION_ALG_TKIP) { |
| 7225 | | | g_strlcpy (wlan_stats.protection, "TKIP", MAX_PROTECT_LEN); |
| 7226 | | | } else if (algorithm == PROTECTION_ALG_CCMP) { |
| 7227 | | | g_strlcpy (wlan_stats.protection, "CCMP", MAX_PROTECT_LEN); |
| 7228 | | | } else { |
| 7229 | | | g_strlcpy (wlan_stats.protection, "Unknown", MAX_PROTECT_LEN); |
| 7230 | | | } |
| 7231 | | | |
| 7232 | | | #ifndef HAVE_AIRPDCAP |
| 7233 | | | if (can_decrypt) |
| 7234 | | | next_tvb = try_decrypt_wep(tvb, hdr_len, reported_len + 8); |
| 7235 | | | #else |
| 7236 | | | |
| 7237 | | | |
| 7238 | | | #endif |
| 7239 | | | if (!can_decrypt || next_tvb == NULL) { |
Event 23:
Taking true branch. can_decrypt evaluates to false.
hide
|
|
| 7240 | | | |
| 7241 | | | |
| 7242 | | | |
| 7243 | | | |
| 7244 | | | next_tvb = tvb_new_subset(tvb, hdr_len + ivlen, len, reported_len); |
| 7245 | | | |
| 7246 | | | if (tree) { |
Event 24:
Skipping " if". tree evaluates to false.
hide
|
|
| 7247 | | | |
| 7248 | | | if (algorithm==PROTECTION_ALG_WEP) { |
| 7249 | | | if (can_decrypt) |
| 7250 | | | proto_tree_add_uint_format (wep_tree, hf_wep_icv, tvb, |
| 7251 | | | hdr_len + ivlen + len, 4, |
| 7252 | | | tvb_get_ntohl(tvb, hdr_len + ivlen + len), |
| 7253 | | | "WEP ICV: 0x%08x (not verified)", |
| 7254 | | | tvb_get_ntohl(tvb, hdr_len + ivlen + len)); |
| 7255 | | | } else if (algorithm==PROTECTION_ALG_CCMP) { |
| 7256 | | | } else if (algorithm==PROTECTION_ALG_TKIP) { |
| 7257 | | | } |
| 7258 | | | } |
| 7259 | | | |
| 7260 | | | |
| 7261 | | | if (pinfo->ethertype != ETHERTYPE_CENTRINO_PROMISC && wlan_ignore_wep == WLAN_IGNORE_WEP_NO) {
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/etypes.h |
| |
102 | #define ETHERTYPE_CENTRINO_PROMISC 0x2452 /* Intel Centrino promiscuous packets */ |
| |
|
Event 25:
Skipping " if". pinfo->ethertype != 9298 evaluates to false.
hide
|
|
| 7262 | | | |
| 7263 | | | call_dissector(data_handle, next_tvb, pinfo, tree); |
| 7264 | | | goto end_of_wlan; |
| 7265 | | | } |
| 7266 | | | } else { |
| 7267 | | | |
| 7268 | | | if (algorithm==PROTECTION_ALG_WEP) { |
| 7269 | | | if (tree) |
| 7270 | | | proto_tree_add_uint_format (wep_tree, hf_wep_icv, tvb, |
| 7271 | | | hdr_len + ivlen + len, 4, |
| 7272 | | | tvb_get_ntohl(tvb, hdr_len + ivlen + len), |
| 7273 | | | "WEP ICV: 0x%08x (correct)", |
| 7274 | | | tvb_get_ntohl(tvb, hdr_len + ivlen + len)); |
| 7275 | | | |
| 7276 | | | add_new_data_source(pinfo, next_tvb, "Decrypted WEP data"); |
| 7277 | | | } else if (algorithm==PROTECTION_ALG_CCMP) { |
| 7278 | | | add_new_data_source(pinfo, next_tvb, "Decrypted CCMP data"); |
| 7279 | | | } else if (algorithm==PROTECTION_ALG_TKIP) { |
| 7280 | | | add_new_data_source(pinfo, next_tvb, "Decrypted TKIP data"); |
| 7281 | | | } |
| 7282 | | | |
| 7283 | | | |
| 7284 | | | #undef IS_TKIP |
| 7285 | | | #undef IS_CCMP |
| 7286 | | | #undef PROTECTION_ALG_CCMP |
| 7287 | | | #undef PROTECTION_ALG_TKIP |
| 7288 | | | #undef PROTECTION_ALG_WEP |
| 7289 | | | |
| 7290 | | | } |
| 7291 | | | |
| 7292 | | | |
| 7293 | | | |
| 7294 | | | |
| 7295 | | | |
| 7296 | | | |
| 7297 | | | |
| 7298 | | | |
| 7299 | | | hdr_len = 0; |
| 7300 | | | |
| 7301 | | | } else { |
| 7302 | | | |
| 7303 | | | |
| 7304 | | | |
| 7305 | | | |
| 7306 | | | |
| 7307 | | | |
| 7308 | | | |
| 7309 | | | |
| 7310 | | | |
| 7311 | | | next_tvb = tvb; |
| 7312 | | | } |
| 7313 | | | |
| 7314 | | | |
| 7315 | | | |
| 7316 | | | |
| 7317 | | | |
| 7318 | | | |
| 7319 | | | |
| 7320 | | | |
| 7321 | | | |
| 7322 | | | |
| 7323 | | | |
| 7324 | | | |
| 7325 | | | |
| 7326 | | | |
| 7327 | | | |
| 7328 | | | |
| 7329 | | | |
| 7330 | | | |
| 7331 | | | |
| 7332 | | | |
| 7333 | | | |
| 7334 | | | |
| 7335 | | | save_fragmented = pinfo->fragmented; |
| 7336 | | | if (wlan_defragment && (more_frags || frag_number != 0)) { |
Event 26:
Taking false branch. wlan_defragment evaluates to false.
hide
|
|
| 7337 | | | fragment_data *fd_head; |
| 7338 | | | |
| 7339 | | | |
| 7340 | | | |
| 7341 | | | |
| 7342 | | | |
| 7343 | | | |
| 7344 | | | |
| 7345 | | | if (reported_len < 0) |
| 7346 | | | THROW(ReportedBoundsError);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
223 | #define THROW(x) \ |
224 | except_throw(XCEPT_GROUP_WIRESHARK, (x), NULL) |
| |
|
| 7347 | | | fd_head = fragment_add_seq_802_11(next_tvb, hdr_len, pinfo, seq_number, |
| 7348 | | | wlan_fragment_table, |
| 7349 | | | wlan_reassembled_table, |
| 7350 | | | frag_number, |
| 7351 | | | reported_len, |
| 7352 | | | more_frags); |
| 7353 | | | next_tvb = process_reassembled_data(tvb, hdr_len, pinfo, |
| 7354 | | | "Reassembled 802.11", fd_head, |
| 7355 | | | &frag_items, NULL, hdr_tree); |
| 7356 | | | } else { |
| 7357 | | | |
| 7358 | | | |
| 7359 | | | |
| 7360 | | | |
| 7361 | | | if (frag_number != 0) { |
Event 27:
Taking true branch. frag_number != 0 evaluates to true.
hide
|
|
| 7362 | | | |
| 7363 | | | next_tvb = NULL; |
| 7364 | | | } else { |
| 7365 | | | |
| 7366 | | | |
| 7367 | | | |
| 7368 | | | next_tvb = tvb_new_subset (next_tvb, hdr_len, len, reported_len); |
| 7369 | | | |
| 7370 | | | |
| 7371 | | | |
| 7372 | | | |
| 7373 | | | |
| 7374 | | | if (more_frags) |
| 7375 | | | pinfo->fragmented = TRUE; |
| 7376 | | | else |
| 7377 | | | pinfo->fragmented = FALSE; |
| 7378 | | | } |
| 7379 | | | } |
| 7380 | | | |
| 7381 | | | if (next_tvb == NULL) { |
Event 28:
Skipping " if". next_tvb == (void *)0 evaluates to false.
hide
|
|
| 7382 | | | |
| 7383 | | | if (check_col(pinfo->cinfo, COL_INFO)) |
| 7384 | | | col_set_str(pinfo->cinfo, COL_INFO, "Fragmented IEEE 802.11 frame"); |
| 7385 | | | next_tvb = tvb_new_subset (tvb, hdr_len, len, reported_len); |
| 7386 | | | call_dissector(data_handle, next_tvb, pinfo, tree); |
| 7387 | | | pinfo->fragmented = save_fragmented; |
| 7388 | | | goto end_of_wlan; |
| 7389 | | | } |
| 7390 | | | |
| 7391 | | | switch (FCF_FRAME_TYPE (fcf)) |
Event 29:
(fcf & 12) >> 2 evaluates to 0.
hide
|
|
| 7392 | | | { |
| 7393 | | | |
| 7394 | | | case MGT_FRAME: |
| 7395 | | | dissect_ieee80211_mgt (fcf, next_tvb, pinfo, tree); |
| 7396 | | | break; |
| 7397 | | | |
| 7398 | | | case DATA_FRAME: |
| 7399 | | | if (is_amsdu && tvb_reported_length_remaining(next_tvb, 0) > 4){ |
| 7400 | | | tvbuff_t *volatile msdu_tvb = NULL; |
| 7401 | | | guint32 msdu_offset = 0; |
| 7402 | | | guint16 i = 1; |
| 7403 | | | const guint8 *src = NULL; |
| 7404 | | | const guint8 *dst = NULL; |
| 7405 | | | guint16 msdu_length; |
| 7406 | | | proto_item *parent_item; |
| 7407 | | | proto_tree *mpdu_tree; |
| 7408 | | | proto_tree *subframe_tree; |
| 7409 | | | |
| 7410 | | | parent_item = proto_tree_add_protocol_format(tree, proto_aggregate, next_tvb, 0, |
| 7411 | | | tvb_reported_length_remaining(next_tvb, 0), "IEEE 802.11 Aggregate MSDU"); |
| 7412 | | | mpdu_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_parent_tree); |
| 7413 | | | |
| 7414 | | | do { |
| 7415 | | | dst = tvb_get_ptr (next_tvb, msdu_offset, 6); |
| 7416 | | | src = tvb_get_ptr (next_tvb, msdu_offset+6, 6); |
| 7417 | | | msdu_length = tvb_get_ntohs (next_tvb, msdu_offset+12); |
| 7418 | | | |
| 7419 | | | parent_item = proto_tree_add_uint_format(mpdu_tree, , next_tvb, |
| 7420 | | | msdu_offset, roundup2(msdu_offset+14+msdu_length, 4),
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ieee80211.c |
| |
89 | #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ |
| |
|
| 7421 | | | i, "A-MSDU Subframe #%u", i); |
| 7422 | | | subframe_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_subframe_tree); |
| 7423 | | | i++; |
| 7424 | | | |
| 7425 | | | proto_tree_add_ether(subframe_tree, hf_addr_da, next_tvb, msdu_offset, 6, dst); |
| 7426 | | | proto_tree_add_ether(subframe_tree, hf_addr_sa, next_tvb, msdu_offset+6, 6, src); |
| 7427 | | | proto_tree_add_uint_format(subframe_tree, mcsset_highest_data_rate, next_tvb, msdu_offset+12, 2, |
| 7428 | | | msdu_length, "MSDU length: 0x%04X", msdu_length); |
| 7429 | | | |
| 7430 | | | msdu_offset += 14; |
| 7431 | | | msdu_tvb = tvb_new_subset(next_tvb, msdu_offset, msdu_length, -1); |
| 7432 | | | call_dissector(llc_handle, msdu_tvb, pinfo, subframe_tree); |
| 7433 | | | msdu_offset = roundup2(msdu_offset+msdu_length, 4);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ieee80211.c |
| |
89 | #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ |
| |
|
| 7434 | | | } while (tvb_reported_length_remaining(next_tvb, msdu_offset) > 14); |
| 7435 | | | |
| 7436 | | | break; |
| 7437 | | | } |
| 7438 | | | |
| 7439 | | | |
| 7440 | | | |
| 7441 | | | |
| 7442 | | | |
| 7443 | | | |
| 7444 | | | |
| 7445 | | | |
| 7446 | | | |
| 7447 7458 |  | | [ Lines 7447 to 7458 omitted. ] |
| 7459 | | | |
| 7460 | | | |
| 7461 | | | |
| 7462 | | | |
| 7463 | | | |
| 7464 | | | |
| 7465 | | | |
| 7466 | | | |
| 7467 | | | |
| 7468 | | | |
| 7469 | | | encap_type = ENCAP_802_2; |
| 7470 | | | TRY {
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
176 | #define TRY \ |
177 | {\ |
178 | except_t *exc; \ |
179 | volatile int except_state = 0; \ |
180 | static const except_id_t catch_spec[] = { \ |
181 | { XCEPT_GROUP_WIRESHARK, XCEPT_CODE_ANY } }; \ |
182 | except_try_push(catch_spec, 1, &exc); \ |
183 | \ |
184 | if(except_state & EXCEPT_CAUGHT) \ |
185 | except_state |= EXCEPT_RETHROWN; \ |
186 | except_state &= ~EXCEPT_CAUGHT; \ |
187 | \ |
188 | if (except_state == 0 && exc == 0) \ |
189 | /* user's code goes here */ |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/except.h |
| |
143 | #define except_try_push(ID, NUM, PPE) \ |
144 | { \ |
145 | struct except_stacknode except_sn; \ |
146 | struct except_catch except_ch; \ |
147 | except_setup_try(&except_sn, &except_ch, ID, NUM); \ |
148 | if (setjmp(except_ch.except_jmp)) \ |
149 | *(PPE) = &except_ch.except_obj; \ |
150 | else \ |
151 | *(PPE) = 0 |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
165 | #define EXCEPT_CAUGHT 1 /* exception has been caught, no need to rethrow at |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
168 | #define EXCEPT_RETHROWN 2 /* the exception was rethrown from a CATCH |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
165 | #define EXCEPT_CAUGHT 1 /* exception has been caught, no need to rethrow at |
| |
|
| 7471 | | | octet1 = tvb_get_guint8(next_tvb, 0); |
| 7472 | | | octet2 = tvb_get_guint8(next_tvb, 1); |
| 7473 | | | if (octet1 != 0xaa || octet2 != 0xaa) { |
| 7474 | | | src = tvb_get_ptr (next_tvb, 6, 6); |
| 7475 | | | dst = tvb_get_ptr (next_tvb, 0, 6); |
| 7476 | | | if (memcmp(src, pinfo->dl_src.data, 6) == 0 || |
| 7477 | | | memcmp(dst, pinfo->dl_dst.data, 6) == 0) |
| 7478 | | | encap_type = ENCAP_ETHERNET; |
| 7479 | | | else if (octet1 == 0xff && octet2 == 0xff) |
| 7480 | | | encap_type = ENCAP_IPX; |
| 7481 | | | else if (octet1 == 0x00 && octet2 == 0x00) { |
| 7482 | | | proto_tree_add_text(tree, next_tvb, 0, 2, "Mysterious OLPC stuff"); |
| 7483 | | | next_tvb = tvb_new_subset (next_tvb, 2, -1, -1); |
| 7484 | | | } |
| 7485 | | | } |
| 7486 | | | } |
| 7487 | | | CATCH2(BoundsError, ReportedBoundsError) {
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
207 | #define CATCH2(x,y) \ |
208 | if (except_state == 0 && exc != 0 && \ |
209 | (exc->except_id.except_code == (x) || exc->except_id.except_code == (y)) && \ |
210 | (except_state|=EXCEPT_CAUGHT)) \ |
211 | /* user's code goes here */ |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
165 | #define EXCEPT_CAUGHT 1 /* exception has been caught, no need to rethrow at |
| |
|
| 7488 | | | ; |
| 7489 | | | |
| 7490 | | | } |
| 7491 | | | ENDTRY;
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
191 | #define ENDTRY \ |
192 | /* rethrow the exception if necessary */ \ |
193 | if(!(except_state&EXCEPT_CAUGHT) && exc != 0) \ |
194 | except_rethrow(exc); \ |
195 | except_try_pop();\ |
196 | } |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
165 | #define EXCEPT_CAUGHT 1 /* exception has been caught, no need to rethrow at |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/except.h |
| |
153 | #define except_try_pop() \ |
154 | except_free(except_ch.except_obj.except_dyndata); \ |
155 | except_pop(); \ |
156 | } |
| |
|
| 7492 | | | |
| 7493 | | | switch (encap_type) { |
| 7494 | | | |
| 7495 | | | case ENCAP_802_2: |
| 7496 | | | call_dissector(llc_handle, next_tvb, pinfo, tree); |
| 7497 | | | break; |
| 7498 | | | |
| 7499 | | | case ENCAP_ETHERNET: |
| 7500 | | | call_dissector(eth_withoutfcs_handle, next_tvb, pinfo, tree); |
| 7501 | | | break; |
| 7502 | | | |
| 7503 | | | case ENCAP_IPX: |
| 7504 | | | call_dissector(ipx_handle, next_tvb, pinfo, tree); |
| 7505 | | | break; |
| 7506 | | | } |
| 7507 | | | break; |
| 7508 | | | } |
| 7509 | | | pinfo->fragmented = save_fragmented; |
| 7510 | | | |
| 7511 | | | end_of_wlan: |
| 7512 | | | whdr->stats = wlan_stats; |
| 7513 | | | tap_queue_packet(wlan_tap, pinfo, whdr); |
| 7514 | | | memset (&wlan_stats, 0, sizeof wlan_stats); |
| 7515 | | | } |
| |