(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc-spoolss.c) |
| |
| 3818 | | | static int SpoolssEnumPrinterData_r(tvbuff_t *tvb, int offset, |
| 3819 | | | packet_info *pinfo, proto_tree *tree, |
| 3820 | | | guint8 *drep _U_) |
| 3821 | | | { |
| 3822 | | | guint32 value_len, type; |
| 3823 | | | char *value; |
| 3824 | | | proto_item *value_item; |
| 3825 | | | proto_tree *value_subtree; |
| 3826 | | | proto_item *hidden_item; |
| 3827 | | | |
| 3828 | | | hidden_item = proto_tree_add_uint( |
| 3829 | | | tree, hf_printerdata, tvb, offset, 0, 1); |
| 3830 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 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) |
| |
|
Event 1:
hidden_item evaluates to true.
hide
|
|
| 3831 | | | |
| 3832 | | | |
| 3833 | | | |
| 3834 | | | value_item = proto_tree_add_text(tree, tvb, offset, 0, "Value"); |
| 3835 | | | |
| 3836 | | | value_subtree = proto_item_add_subtree( |
| 3837 | | | value_item, ett_printerdata_value); |
| 3838 | | | |
| 3839 | | | offset = dissect_ndr_uint32( |
| 3840 | | | tvb, offset, pinfo, value_subtree, drep, |
| 3841 | | | hf_enumprinterdata_value_len, &value_len); |
| 3842 | | | |
| 3843 | | | if (value_len) { |
Event 2:
Skipping " if". value_len evaluates to false.
hide
|
|
| 3844 | | | dissect_spoolss_uint16uni( |
| 3845 | | | tvb, offset, pinfo, value_subtree, drep, &value, |
| 3846 | | | "Value name"); |
| 3847 | | | |
| 3848 | | | offset += value_len * 2; |
| 3849 | | | |
| 3850 | | | if (check_col(pinfo->cinfo, COL_INFO) && value && value[0]) |
| 3851 | | | col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", value); |
| 3852 | | | |
| 3853 | | | proto_item_append_text(value_item, ": %s", value); |
| 3854 | | | |
| 3855 | | | hidden_item = proto_tree_add_string( |
| 3856 | | | tree, hf_printerdata_value, tvb, offset, 0, value); |
| 3857 | | | PROTO_ITEM_SET_HIDDEN(hidden_item);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
319 | #define PROTO_ITEM_SET_HIDDEN(proto_item) \ |
320 | ((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 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) |
| |
|
| 3858 | | | |
| 3859 | | | g_free(value); |
| 3860 | | | } |
| 3861 | | | |
| 3862 | | | proto_item_set_len(value_item, value_len * 2 + 4); |
| 3863 | | | |
| 3864 | | | offset = dissect_ndr_uint32( |
| 3865 | | | tvb, offset, pinfo, value_subtree, drep, |
| 3866 | | | hf_enumprinterdata_value_needed, NULL); |
| 3867 | | | |
| 3868 | | | offset = dissect_ndr_uint32( |
| 3869 | [+] | | tvb, offset, pinfo, tree, drep, hf_printerdata_type, &type); |
Event 3:
dissect_ndr_uint32() does not initialize type. - This may be because of a failure case or other special case for dissect_ndr_uint32().
hide
|
|
 |
| 3870 | | | |
| 3871 | | | offset = dissect_printerdata_data( |
| 3872 | | | tvb, offset, pinfo, tree, drep, type); |
Uninitialized Variable
type was not initialized. The issue can occur if the highlighted code executes. See related event 3. Show: All events | Only primary events |
|
| |