(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-x509if.c) |
| |
| 390 | | | dissect_x509if_T_values_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
| 391 | | | #line 225 "x509if.cnf" |
| 392 | | | int old_offset = offset; |
| 393 | | | tvbuff_t *out_tvb; |
| 394 | | | char *value = NULL; |
| 395 | | | const char *fmt; |
| 396 | | | const char *name = NULL; |
| 397 | | | const char *orig_oid = object_identifier_id; |
| 398 | | | |
| 399 | | | offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); |
| 400 | | | |
| 401 | | | |
| 402 | | | |
| 403 | | | object_identifier_id = orig_oid; |
| 404 | | | |
| 405 | | | |
| 406 | | | dissect_ber_octet_string(FALSE, actx, NULL, tvb, old_offset, hf_x509if_any_string, &out_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 |
|
| 407 | | | |
| 408 | | | |
| 409 | | | |
| 410 | | | |
| 411 | | | if(out_tvb) { |
Event 2:
Taking true branch. out_tvb evaluates to true.
hide
|
|
| 412 | | | |
| 413 | | | value = tvb_format_text(out_tvb, 0, tvb_length(out_tvb)); |
| 414 | | | |
| 415 | | | if(doing_dn) { |
Event 3:
Taking true branch. doing_dn evaluates to true.
hide
|
|
| 416 | | | g_strlcat(last_rdn, value, MAX_RDN_STR_LEN); |
| 417 | | | |
| 418 | | | |
| 419 | | | proto_item_append_text(tree, "%s)", value); |
| 420 | | | } |
| 421 | | | |
| 422 | | | if((fmt = val_to_str(ava_hf_index, fmt_vals, "")) && *fmt) { |
| 423 | | | |
| 424 | | | |
| 425 | | | if(!(name = oid_resolved_from_string(object_identifier_id))) |
Event 5:
Taking true branch. name = oid_resolved_from_string(...) evaluates to false.
hide
|
|
| 426 | | | name = object_identifier_id; |
| 427 | | | g_snprintf(last_ava, MAX_AVA_STR_LEN, "%s %s %s", name, fmt, value); |
| 428 | | | |
| 429 | | | proto_item_append_text(tree, " %s", last_ava); |
| 430 | | | |
| 431 | | | } |
| 432 | | | } |
| 433 | | | |
| 434 | | | |
| 435 | | | |
| 436 | | | return offset; |
| 437 | | | } |
| |