(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-giop.c) |
| |
| 4624 | | | static void decode_IIOP_IOR_profile(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, |
| 4625 | | | guint32 boundary, gboolean stream_is_big_endian, gchar *repo_id_buf, |
| 4626 | | | gboolean store_flag) { |
| 4627 | | | |
| 4628 | | | guint32 i; |
| 4629 | | | |
| 4630 | | | guint8 v_major,v_minor; |
| 4631 | | | gchar *buf; |
| 4632 | | | guint32 u_octet4; |
| 4633 | | | guint16 u_octet2; |
| 4634 | | | guint32 seqlen; |
| 4635 | | | guint32 seqlen1; |
| 4636 | | | gchar *objkey; |
| 4637 | | | gchar *p_chars; |
| 4638 | | | |
| 4639 | | | |
| 4640 | | | |
| 4641 | | | |
| 4642 | | | v_major = get_CDR_octet(tvb,offset); |
| 4643 | | | v_minor = get_CDR_octet(tvb,offset); |
| 4644 | | | |
| 4645 | | | |
| 4646 | | | if (tree) { |
| 4647 | | | proto_tree_add_uint(tree,hf_giop_iiop_v_maj,tvb, |
| 4648 | | | *offset-sizeof(v_minor)-sizeof(v_major),1,v_major ); |
| 4649 | | | proto_tree_add_uint(tree,hf_giop_iiop_v_min,tvb, |
| 4650 | | | *offset-sizeof(v_minor),1,v_minor ); |
| 4651 | | | } |
| 4652 | | | |
| 4653 | | | |
| 4654 | | | |
| 4655 | | | |
| 4656 | | | u_octet4 = get_CDR_string(tvb,&buf,offset,stream_is_big_endian,boundary); |
| 4657 | | | |
| 4658 | | | if (tree) { |
| 4659 | | | proto_tree_add_uint(tree,hf_giop_string_length,tvb, |
| 4660 | | | *offset-u_octet4-sizeof(u_octet4),4,u_octet4); |
| 4661 | | | if (u_octet4 > 0) { |
| 4662 | | | proto_tree_add_string(tree,hf_giop_iiop_host,tvb, |
| 4663 | | | *offset-u_octet4,u_octet4,buf); |
| 4664 | | | } |
| 4665 | | | } |
| 4666 | | | |
| 4667 | | | g_free(buf); |
| 4668 | | | |
| 4669 | | | |
| 4670 | | | |
| 4671 | | | u_octet2 = get_CDR_ushort(tvb,offset,stream_is_big_endian,boundary); |
| 4672 | | | |
| 4673 | | | if (tree) { |
| 4674 | | | proto_tree_add_uint(tree,hf_giop_iiop_port,tvb, |
| 4675 | | | *offset-sizeof(u_octet2),2,u_octet2); |
| 4676 | | | } |
| 4677 | | | |
| 4678 | | | |
| 4679 | | | |
| 4680 | | | |
| 4681 | | | seqlen = get_CDR_ulong(tvb,offset,stream_is_big_endian,boundary); |
| 4682 | | | |
| 4683 | | | if (tree) { |
| 4684 | | | proto_tree_add_uint(tree,hf_giop_sequence_length,tvb, |
| 4685 | | | *offset-sizeof(seqlen),4,seqlen); |
| 4686 | | | } |
| 4687 | | | |
| 4688 | | | if (seqlen > 0) { |
| 4689 | | | |
| 4690 | | | get_CDR_octet_seq(tvb, &objkey, offset, seqlen); |
| 4691 | | | |
| 4692 | | | |
| 4693 | | | |
| 4694 | | | |
| 4695 | | | |
| 4696 | | | |
| 4697 | | | |
| 4698 | | | |
| 4699 | | | |
| 4700 | | | |
| 4701 | | | if (repo_id_buf) { |
| 4702 | | | if (pinfo) { |
| 4703 | | | if(!pinfo->fd->flags.visited) |
| 4704 | | | insert_in_objkey_hash(giop_objkey_hash,objkey,seqlen,repo_id_buf,req_res); |
| 4705 | | | } |
| 4706 | | | else { |
| 4707 | | | |
| 4708 | | | |
| 4709 | | | |
| 4710 | | | |
| 4711 | | | |
| 4712 | | | if (store_flag) |
| 4713 | | | insert_in_objkey_hash(giop_objkey_hash,objkey,seqlen,repo_id_buf,file); |
| 4714 | | | } |
| 4715 | | | } |
| 4716 | | | |
| 4717 | | | if(tree) { |
| 4718 | | | proto_tree_add_item(tree, hf_giop_objekt_key, tvb, *offset -seqlen, seqlen, FALSE); |
| 4719 | | | } |
| 4720 | | | g_free(objkey); |
| 4721 | | | } |
| 4722 | | | |
| 4723 | | | |
| 4724 | | | |
| 4725 | | | |
| 4726 | | | |
| 4727 | | | |
| 4728 | | | |
| 4729 | | | switch(v_minor) { |
| 4730 | | | case 0: |
| 4731 | | | |
| 4732 | | | |
| 4733 | | | break; |
| 4734 | | | |
| 4735 | | | case 1: |
| 4736 | | | case 2: |
| 4737 | | | |
| 4738 | | | |
| 4739 | | | |
| 4740 | | | |
| 4741 | | | |
| 4742 | | | seqlen = get_CDR_ulong(tvb,offset,stream_is_big_endian,boundary); |
| 4743 | | | |
| 4744 | | | if (tree) { |
| 4745 | | | proto_tree_add_uint(tree,hf_giop_sequence_length,tvb, |
| 4746 | | | *offset-sizeof(seqlen),4,seqlen); |
| 4747 | | | } |
| 4748 | | | |
| 4749 | | | for (i=0; i< seqlen; i++) { |
Event 6:
Continuing from loop body. Leaving loop. i < seqlen evaluates to false.
hide
|
|
| 4750 | | | |
| 4751 | | | u_octet4 = 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 |
|
| 4752 | | | if (tree) { |
Event 2:
Skipping " if". tree evaluates to false.
hide
|
|
| 4753 | | | proto_tree_add_uint(tree,hf_giop_IIOP_tag,tvb, |
| 4754 | | | *offset-sizeof(u_octet4),4,u_octet4); |
| 4755 | | | } |
| 4756 | | | |
| 4757 | | | |
| 4758 | | | seqlen1 = get_CDR_ulong(tvb,offset,stream_is_big_endian,boundary); |
| 4759 | | | if (tree) { |
Event 3:
Skipping " if". tree evaluates to false.
hide
|
|
| 4760 | | | proto_tree_add_uint(tree,hf_giop_sequence_length,tvb, |
| 4761 | | | *offset-sizeof(seqlen1),4,seqlen1); |
| 4762 | | | } |
| 4763 | | | |
| 4764 | | | if (seqlen1 > 0) { |
Event 4:
Taking true branch. seqlen1 > 0 evaluates to true.
hide
|
|
| 4765 | | | get_CDR_octet_seq(tvb, &buf, offset, seqlen1); |
| 4766 | | | |
| 4767 | | | if (tree) { |
Event 5:
Skipping " if". tree evaluates to false.
hide
|
|
| 4768 | | | |
| 4769 | | | |
| 4770 | | | p_chars = make_printable_string(buf, seqlen1); |
| 4771 | | | |
| 4772 | | | proto_tree_add_text (tree, tvb, *offset -seqlen1, seqlen1, |
| 4773 | | | "component_data: %s", p_chars); |
| 4774 | | | |
| 4775 | | | g_free(p_chars); |
| 4776 | | | } |
| 4777 | | | |
| 4778 | | | g_free(buf); |
| 4779 | | | } |
| 4780 | | | |
| 4781 | | | } |
| 4782 | | | |
| 4783 | | | |
| 4784 | | | break; |
| 4785 | | | |
| 4786 | | | default: |
| 4787 | | | g_warning("giop:Invalid v_minor value = %u ", v_minor);
x /usr/include/glib-2.0/glib/gmessages.h |
| |
153 | #define g_warning(...) g_log (G_LOG_DOMAIN, \ |
154 | G_LOG_LEVEL_WARNING, \ |
155 | __VA_ARGS__) |
| |
|
| 4788 | | | break; |
| 4789 | | | } |
| 4790 | | | |
| 4791 | | | } |
| |