(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-h248_3gpp.c) |
| |
| 307 | | | static void dissect_3GTFO_codec_list(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* cu _U_, void* ignored _U_) { |
| 308 | | | tvbuff_t* sub_tvb = NULL; |
| 309 | | | gint8 class; |
| 310 | | | gboolean pc; |
| 311 | | | gint32 tag; |
| 312 | | | asn1_ctx_t asn1_ctx; |
| 313 | | | |
| 314 | | | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); |
| 315 | | | |
| 316 | | | get_ber_identifier(tvb, 0, &class, &pc, &tag); |
| 317 | | | |
| 318 | | | if ((tag==BER_UNI_TAG_OCTETSTRING)) { |
| 319 | | | dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, 0, hfid, &sub_tvb ); |
Ignored Return Value
The return value of dissect_ber_octet_string() 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 dissect_ber_octet_string() 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 dissect_ber_octet_string() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 320 | | | |
| 321 | | | if (sub_tvb) { |
Event 2:
Taking true branch. sub_tvb evaluates to true.
hide
|
|
| 322 | | | proto_tree* pt = proto_item_add_subtree(asn1_ctx.created_item,ett_h248_3GTFO_codec_list); |
| 323 | | | int len = tvb_length(sub_tvb); |
| 324 | | | int offset = 0; |
| 325 | | | do { |
| 326 | | | offset = dissect_codec_mode(pt, sub_tvb, offset, len); |
| 327 | | | } while(offset < len); |
| 328 | | | } |
| 329 | | | } else { |
| 330 | | | proto_tree_add_item(tree,hfid,tvb,0,-1,FALSE); |
| 331 | | | } |
| 332 | | | } |
| |