(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ansi_map.c) |
| |
| 16142 | | | dissect_ansi_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) |
| 16143 | | | { |
| 16144 | | | proto_item *ansi_map_item; |
| 16145 | | | proto_tree *ansi_map_tree = NULL; |
| 16146 | | | int offset = 0; |
| 16147 | | | struct ansi_tcap_private_t *p_private_tcap; |
| 16148 | | | asn1_ctx_t asn1_ctx; |
| 16149 | | | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); |
| 16150 | | | |
| 16151 | | | SMS_BearerData_tvb = NULL; |
| 16152 | | | ansi_map_sms_tele_id = -1; |
| 16153 | | | g_pinfo = pinfo; |
| 16154 | | | g_tree = tree; |
| 16155 | | | |
| 16156 | | | |
| 16157 | | | |
| 16158 | | | if (check_col(pinfo->cinfo, COL_PROTOCOL)) |
| 16159 | | | { |
| 16160 | | | col_set_str(pinfo->cinfo, COL_PROTOCOL, "ANSI MAP"); |
| 16161 | | | } |
| 16162 | | | |
| 16163 | | | |
| 16164 | | | if (pinfo->private_data == NULL){ |
| 16165 | | | proto_tree_add_text(tree, tvb, 0, -1, "Dissector ERROR this dissector relays on private data"); |
| 16166 | | | return; |
| 16167 | | | } |
| 16168 | | | |
| 16169 | | | |
| 16170 | | | |
| 16171 | | | |
| 16172 | | | ansi_map_item = proto_tree_add_item(tree, proto_ansi_map, tvb, 0, -1, FALSE); |
| 16173 | | | ansi_map_tree = proto_item_add_subtree(ansi_map_item, ett_ansi_map); |
| 16174 | | | ansi_map_is_invoke = FALSE; |
| 16175 | | | is683_ota = FALSE; |
| 16176 | | | is801_pld = FALSE; |
| 16177 | | | ServiceIndicator = 0; |
| 16178 | | | |
| 16179 | | | p_private_tcap=pinfo->private_data; |
| 16180 | | | |
| 16181 | | | switch(p_private_tcap->d.pdu){ |
| 16182 | | | |
| 16183 | | | |
| 16184 | | | |
| 16185 | | | |
| 16186 | | | |
| 16187 | | | |
| 16188 | | | case 1: |
| 16189 | | | OperationCode = p_private_tcap->d.OperationCode_private & 0x00ff; |
| 16190 | | | ansi_map_is_invoke = TRUE; |
| 16191 | | | if (check_col(pinfo->cinfo, COL_INFO)){ |
| 16192 | | | col_clear(pinfo->cinfo, COL_INFO); |
| 16193 | | | col_add_fstr(pinfo->cinfo, COL_INFO,"%s Invoke", val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)")); |
| 16194 | | | } |
| 16195 | | | proto_item_append_text(p_private_tcap->d.OperationCode_item," %s",val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)")); |
| 16196 | | | offset = dissect_invokeData(ansi_map_tree, tvb, 0, &asn1_ctx); |
| 16197 | | | update_saved_invokedata(pinfo, ansi_map_tree, tvb); |
| 16198 | | | break; |
| 16199 | | | case 2: |
| 16200 | | | OperationCode = find_saved_invokedata(&asn1_ctx); |
| 16201 | | | if (check_col(pinfo->cinfo, COL_INFO)){ |
| 16202 | | | col_clear(pinfo->cinfo, COL_INFO); |
| 16203 | | | col_add_fstr(pinfo->cinfo, COL_INFO,"%s ReturnResult", val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)")); |
| 16204 | | | } |
| 16205 | | | proto_item_append_text(p_private_tcap->d.OperationCode_item," %s",val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)")); |
| 16206 | | | offset = dissect_returnData(ansi_map_tree, tvb, 0, &asn1_ctx); |
| 16207 | | | break; |
| 16208 | | | case 3: |
| 16209 | | | if (check_col(pinfo->cinfo, COL_INFO)){ |
| 16210 | | | col_clear(pinfo->cinfo, COL_INFO); |
| 16211 | | | col_add_fstr(pinfo->cinfo, COL_INFO,"%s ReturnError", val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)")); |
| 16212 | | | } |
| 16213 | | | break; |
| 16214 | | | case 4: |
| 16215 | | | if (check_col(pinfo->cinfo, COL_INFO)){ |
| 16216 | | | col_clear(pinfo->cinfo, COL_INFO); |
| 16217 | | | col_add_fstr(pinfo->cinfo, COL_INFO,"%s Reject", val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)")); |
| 16218 | | | } |
| 16219 | | | break; |
| 16220 | | | default: |
| 16221 | | | |
| 16222 | | | DISSECTOR_ASSERT_NOT_REACHED();
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
131 | #define DISSECTOR_ASSERT_NOT_REACHED() \ |
132 | (REPORT_DISSECTOR_BUG( \ |
133 | ep_strdup_printf("%s:%u: failed assertion \"DISSECTOR_ASSERT_NOT_REACHED\"", \ |
134 | __FILE__, __LINE__))) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
106 | #define REPORT_DISSECTOR_BUG(message) \ |
107 | ((getenv("WIRESHARK_ABORT_ON_DISSECTOR_BUG") != NULL) ? \ |
108 | abort() : \ |
109 | THROW_MESSAGE(DissectorError, message)) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
226 | #define THROW_MESSAGE(x, y) \ |
227 | except_throw(XCEPT_GROUP_WIRESHARK, (x), (y)) |
| |
|
| 16223 | | | break; |
Unreachable Control Flow
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 16224 | | | } |
| 16225 | | | } |
| |