(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-giop.c) |
| |
| 4542 | | | static void decode_TaggedProfile(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, |
| 4543 | | | guint32 boundary, gboolean stream_is_big_endian, gchar *repobuf) { |
| 4544 | | | |
| 4545 | | | guint32 seqlen_pd; |
| 4546 | | | |
| 4547 | | | guint32 pidtag; |
| 4548 | | | |
| 4549 | | | gchar *profile_data; |
| 4550 | | | gchar *p_profile_data; |
| 4551 | | | |
| 4552 | | | guint32 new_boundary; |
| 4553 | | | gboolean new_big_endianness; |
| 4554 | | | |
| 4555 | | | |
| 4556 | | | |
| 4557 | | | pidtag = get_CDR_ulong(tvb,offset,stream_is_big_endian,boundary); |
Ignored Return Value
The return value of get_CDR_ulong() 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 get_CDR_ulong() is checked 97% 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 get_CDR_ulong() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 4558 | | | |
| 4559 | | | if (tree) { |
Event 2:
Skipping " if". tree evaluates to false.
hide
|
|
| 4560 | | | proto_tree_add_uint(tree,hf_giop_profile_id,tvb, |
| 4561 | | | *offset-sizeof(pidtag),4,pidtag); |
| 4562 | | | } |
| 4563 | | | |
| 4564 | | | |
| 4565 | | | |
| 4566 | | | seqlen_pd = get_CDR_encap_info(tvb, tree, offset, |
| 4567 | | | stream_is_big_endian, boundary, |
| 4568 | | | &new_big_endianness, &new_boundary); |
| 4569 | | | |
| 4570 | | | |
| 4571 | | | |
| 4572 | | | if(seqlen_pd == 0) |
Event 3:
Taking true branch. seqlen_pd == 0 evaluates to true.
hide
|
|
| 4573 | | | return; |
| 4574 | | | |
| 4575 | | | |
| 4576 | | | |
| 4577 | | | |
| 4578 | | | |
| 4579 | | | |
| 4580 | | | |
| 4581 | | | |
| 4582 | | | |
| 4583 | | | |
| 4584 | | | |
| 4585 | | | switch(pidtag) { |
| 4586 | | | case IOP_TAG_INTERNET_IOP: |
| 4587 | | | |
| 4588 | | | decode_IIOP_IOR_profile(tvb, pinfo, tree, offset, new_boundary, new_big_endianness, repobuf, TRUE); |
| 4589 | | | break; |
| 4590 | | | |
| 4591 | | | default: |
| 4592 | | | |
| 4593 | | | |
| 4594 | | | |
| 4595 | | | get_CDR_octet_seq(tvb, &profile_data, offset, seqlen_pd -1); |
| 4596 | | | |
| 4597 | | | |
| 4598 | | | |
| 4599 | | | p_profile_data = make_printable_string( profile_data, seqlen_pd -1); |
| 4600 | | | |
| 4601 | | | if(tree) { |
| 4602 | | | proto_tree_add_text (tree, tvb, *offset -seqlen_pd + 1, seqlen_pd - 1, |
| 4603 | | | "Profile Data: %s", p_profile_data); |
| 4604 | | | } |
| 4605 | | | |
| 4606 | | | g_free(p_profile_data); |
| 4607 | | | |
| 4608 | | | g_free(profile_data); |
| 4609 | | | |
| 4610 | | | break; |
| 4611 | | | |
| 4612 | | | } |
| 4613 | | | |
| 4614 | | | } |
| |