(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc-spoolss.c) |
| |
| 1691 | | | dissect_spoolss_relstr(tvbuff_t *tvb, int offset, packet_info *pinfo, |
| 1692 | | | proto_tree *tree, guint8 *drep, int hf_index, |
| 1693 | | | int struct_start, char **data) |
| 1694 | | | { |
| 1695 | | | proto_item *item; |
| 1696 | | | proto_tree *subtree; |
| 1697 | | | guint32 relstr_offset, relstr_start, relstr_end; |
| 1698 | | | char *text; |
| 1699 | | | |
| 1700 | | | |
| 1701 | | | |
| 1702 | | | |
| 1703 | | | offset = dissect_ndr_uint32( |
| 1704 | | | tvb, offset, pinfo, NULL, drep, hf_offset, &relstr_offset); |
| 1705 | | | |
| 1706 | | | relstr_start = relstr_offset + struct_start; |
| 1707 | | | |
| 1708 | | | if (relstr_offset) { |
| 1709 | | | relstr_end = dissect_spoolss_uint16uni( |
| 1710 | | | tvb, relstr_start, pinfo, NULL, drep, &text, NULL); |
| 1711 | | | } else { |
| 1712 | | | text = g_strdup(""); |
| 1713 | | | relstr_end = relstr_start; |
| 1714 | | | } |
| 1715 | | | |
| 1716 | | | |
| 1717 | | | |
| 1718 | | | item = proto_tree_add_string(tree, hf_index, tvb, relstr_start, relstr_end - relstr_start, text); |
| 1719 | | | subtree = proto_item_add_subtree(item, ett_RELSTR); |
| 1720 | | | |
| 1721 | | | dissect_ndr_uint32( |
| 1722 | | | tvb, offset - 4, pinfo, subtree, drep, hf_offset, NULL); |
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 |
|
| 1723 | | | |
| 1724 | | | if (relstr_offset) |
Event 2:
Taking true branch. relstr_offset evaluates to true.
hide
|
|
| 1725 | | | dissect_spoolss_uint16uni( |
| 1726 | | | tvb, relstr_start, pinfo, subtree, drep, NULL, NULL); |
| 1727 | | | |
| 1728 | | | if (data) |
Event 3:
Taking false branch. data evaluates to false.
hide
|
|
| 1729 | | | *data = text; |
| 1730 | | | else |
| 1731 | | | g_free(text); |
| 1732 | | | |
| 1733 | | | return offset; |
| 1734 | | | } |
| |