(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc-spoolss.c) |
| |
| 6737 | | | static int SpoolssEnumPrinterDataEx_r(tvbuff_t *tvb, int offset, |
| 6738 | | | packet_info *pinfo, proto_tree *tree, |
| 6739 | | | guint8 *drep) |
| 6740 | | | { |
| 6741 | | | guint32 size, num_values; |
| 6742 | | | proto_item *hidden_item; |
| 6743 | | | |
| 6744 | | | hidden_item = proto_tree_add_uint( |
| 6745 | | | tree, hf_printerdata, tvb, offset, 0, 1); |
| 6746 | | | 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) |
| |
|
| 6747 | | | |
| 6748 | | | |
| 6749 | | | |
| 6750 | | | offset = dissect_ndr_uint32( |
| 6751 | | | tvb, offset, pinfo, tree, drep, |
| 6752 | | | hf_buffer_size, &size); |
| 6753 | | | |
| 6754 | | | dissect_ndr_uint32( |
| 6755 | | | tvb, offset + size + 4, pinfo, NULL, drep, hf_returned, |
| 6756 | | | &num_values); |
Ignored Return Value
The return value of dissect_ndr_uint32() 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_ndr_uint32() is checked 100% 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_ndr_uint32() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 6757 | | | |
| 6758 | | | if (size) { |
Event 2:
Taking true branch. size evaluates to true.
hide
|
|
| 6759 | | | proto_item *item; |
| 6760 | | | proto_tree *subtree; |
| 6761 | | | int offset2 = offset; |
| 6762 | | | guint32 i; |
| 6763 | | | |
| 6764 | | | item = proto_tree_add_text( |
| 6765 | | | tree, tvb, offset, 0, "Printer data"); |
| 6766 | | | |
| 6767 | | | subtree = proto_item_add_subtree(item, ett_PRINTER_DATA_CTR); |
| 6768 | | | |
| 6769 | | | for (i=0; i < num_values; i++) |
Event 3:
Entering loop body. i < num_values evaluates to true.
hide
Event 4:
Continuing from loop body. Leaving loop. i < num_values evaluates to false.
hide
|
|
| 6770 | | | offset2 = dissect_spoolss_printer_enum_values( |
| 6771 | | | tvb, offset2, pinfo, subtree, drep); |
| 6772 | | | } |
| 6773 | | | |
| 6774 | | | offset += size; |
| 6775 | | | |
| 6776 | | | offset = dissect_ndr_uint32( |
| 6777 | | | tvb, offset, pinfo, tree, drep, hf_needed, NULL); |
| 6778 | | | |
| 6779 | | | offset = dissect_ndr_uint32( |
| 6780 | | | tvb, offset, pinfo, tree, drep, hf_returned, NULL); |
| 6781 | | | |
| 6782 | | | offset = dissect_doserror( |
| 6783 | | | tvb, offset, pinfo, tree, drep, hf_rc, NULL); |
| 6784 | | | |
| 6785 | | | return offset; |
| 6786 | | | } |
| |