(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc-rs_pgo.c) |
| |
| 169 | | | dissect_error_status_t (tvbuff_t * tvb, int offset, |
| 170 | | | packet_info * pinfo, proto_tree * parent_tree, |
| 171 | | | guint8 * drep) |
| 172 | | | { |
| 173 | | | proto_item *item = NULL; |
| 174 | | | proto_tree *tree = NULL; |
| 175 | | | int old_offset = offset; |
| 176 | | | guint32 st; |
| 177 | | | dcerpc_info *di; |
| 178 | | | const char *st_str; |
| 179 | | | |
| 180 | | | di = pinfo->private_data; |
| 181 | | | if (di->conformant_run) |
| 182 | | | { |
| 183 | | | return offset; |
| 184 | | | } |
| 185 | | | |
| 186 | | | if (parent_tree) |
| 187 | | | { |
| 188 | | | item = proto_tree_add_text (parent_tree, tvb, offset, -1, |
| 189 | | | "error_status_t"); |
| 190 | | | tree = proto_item_add_subtree (item, ett_error_status_t); |
| 191 | | | } |
| 192 | | | |
| 193 | | | offset = |
| 194 | | | dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_error_status_t, |
| 195 | | | &st); |
| 196 | | | 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 |
|
| 197 | | | |
| 198 | | | if (check_col (pinfo->cinfo, COL_INFO)) |
Event 2:
Skipping " if". check_col(...) evaluates to false.
hide
|
|
| 199 | | | col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str); |
| 200 | | | |
| 201 | | | proto_item_set_len (item, offset - old_offset); |
| 202 | | | return offset; |
| 203 | | | } |
| |