(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc-nt.c) |
| |
| 828 | | | dissect_nt_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo, |
| 829 | | | proto_tree *tree, guint8 *drep, int hfindex, |
| 830 | | | e_ctx_hnd *pdata, proto_item **pitem, |
| 831 | | | gboolean is_open, gboolean is_close, e_hnd_type type) |
| 832 | | | { |
| 833 | | | proto_item *item=NULL; |
| 834 | | | proto_tree *subtree; |
| 835 | | | e_ctx_hnd hnd; |
| 836 | | | guint32 open_frame = 0, close_frame = 0; |
| 837 | | | char *name; |
| 838 | | | int old_offset = offset; |
| 839 | | | dcerpc_info *di; |
| 840 | | | |
| 841 | | | di=pinfo->private_data; |
| 842 | | | if(di->conformant_run){ |
| 843 | | | |
| 844 | | | |
| 845 | | | |
| 846 | | | |
| 847 | | | |
| 848 | | | |
| 849 | | | return offset; |
| 850 | | | } |
| 851 | | | |
| 852 | | | |
| 853 | | | |
| 854 | | | switch(type){ |
| 855 | | | case HND_TYPE_CTX_HANDLE: |
| 856 | | | item = proto_tree_add_text(tree, tvb, offset, sizeof(e_ctx_hnd), |
| 857 | | | "Policy Handle"); |
| 858 | | | |
| 859 | | | subtree = proto_item_add_subtree(item, ett_nt_policy_hnd); |
| 860 | | | |
| 861 | | | offset = dissect_ndr_ctx_hnd(tvb, offset, pinfo, subtree, drep, |
| 862 | | | hfindex, &hnd); |
| 863 | | | break; |
| 864 | | | case HND_TYPE_GUID: |
| 865 | | | item = proto_tree_add_text(tree, tvb, offset, 16, |
| 866 | | | "GUID handle"); |
| 867 | | | |
| 868 | | | subtree = proto_item_add_subtree(item, ett_nt_policy_hnd); |
| 869 | | | |
| 870 | | | hnd.attributes=0; |
| 871 | | | offset=dissect_ndr_uuid_t(tvb, offset, pinfo, subtree, drep, hfindex, &hnd.uuid); |
| 872 | | | break; |
| 873 | | | default: |
| 874 | | | 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)) |
| |
|
| 875 | | | return offset; |
Unreachable Data Flow
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 876 | | | } |
| 877 | | | |
| 878 | | | |
| 879 | | | |
| 880 | | | |
| 881 | | | |
| 882 | | | |
| 883 | | | dcerpc_smb_store_pol_pkts(&hnd, pinfo, is_open, is_close); |
| 884 | | | |
| 885 | | | |
| 886 | | | if (dcerpc_fetch_polhnd_data(&hnd, &name, NULL, &open_frame, |
| 887 | | | &close_frame, pinfo->fd->num)) { |
| 888 | | | |
| 889 | | | if (open_frame) { |
| 890 | | | proto_item *item_local; |
| 891 | | | item_local=proto_tree_add_uint( |
| 892 | | | subtree, hf_nt_policy_open_frame, tvb, |
| 893 | | | old_offset, sizeof(e_ctx_hnd), open_frame); |
| 894 | | | PROTO_ITEM_SET_GENERATED(item_local);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
325 | #define PROTO_ITEM_SET_GENERATED(proto_item) \ |
326 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_GENERATED) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 895 | | | } |
| 896 | | | if (close_frame) { |
| 897 | | | proto_item *item_local; |
| 898 | | | item_local=proto_tree_add_uint( |
| 899 | | | subtree, hf_nt_policy_close_frame, tvb, |
| 900 | | | old_offset, sizeof(e_ctx_hnd), close_frame); |
| 901 | | | PROTO_ITEM_SET_GENERATED(item_local);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
325 | #define PROTO_ITEM_SET_GENERATED(proto_item) \ |
326 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_GENERATED) : 0) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
246 | #define FI_SET_FLAG(fi, flag) (fi->flags = fi->flags | flag) |
| |
|
| 902 | | | } |
| 903 | | | |
| 904 | | | |
| 905 | | | |
| 906 | | | |
| 907 | | | |
| 908 | | | |
| 909 | | | |
| 910 | | | if (name != NULL && pitem == NULL) |
| 911 | | | proto_item_append_text(item, ": %s", name); |
| 912 | | | } |
| 913 | | | |
| 914 | | | if (pdata) |
| 915 | | | *pdata = hnd; |
| 916 | | | |
| 917 | | | if (pitem) |
| 918 | | | *pitem = item; |
| 919 | | | |
| 920 | | | return offset; |
| 921 | | | } |
| |