(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc-fileexp.c) |
| |
| 896 | | | dissect_afsErrorStatus (tvbuff_t * tvb, int offset, |
| 897 | | | packet_info * pinfo, proto_tree * parent_tree, |
| 898 | | | guint8 *drep) |
| 899 | | | { |
| 900 | | | proto_item *item = NULL; |
| 901 | | | proto_tree *tree = NULL; |
| 902 | | | int old_offset = offset; |
| 903 | | | guint32 st; |
| 904 | | | dcerpc_info *di; |
| 905 | | | const char *st_str; |
| 906 | | | |
| 907 | | | di = pinfo->private_data; |
| 908 | | | if (di->conformant_run) |
| 909 | | | { |
| 910 | | | return offset; |
| 911 | | | } |
| 912 | | | |
| 913 | | | if (parent_tree) |
| 914 | | | { |
| 915 | | | item = proto_tree_add_text (parent_tree, tvb, offset, -1, |
| 916 | | | "afsErrorStatus"); |
| 917 | | | tree = proto_item_add_subtree (item, ett_fileexp_afsErrorStatus); |
| 918 | | | } |
| 919 | | | |
| 920 | | | offset = |
| 921 | | | dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_afserrorstatus_st, |
| 922 | | | &st); |
| 923 | | | st_str = val_to_str (st, dce_error_vals, "%u"); |
Ignored Return Value
The return value of val_to_str() 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 val_to_str() is checked 98% 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 val_to_str() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 924 | | | |
| 925 | | | if (check_col (pinfo->cinfo, COL_INFO)) |
Event 2:
Skipping " if". check_col(...) evaluates to false.
hide
|
|
| 926 | | | col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str); |
| 927 | | | |
| 928 | | | proto_item_set_len (item, offset - old_offset); |
| 929 | | | return offset; |
| 930 | | | } |
| |