(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc-rs_pgo.c) |
| |
| 995 | | | dissect_rs_pgo_query_result_t (tvbuff_t * tvb, int offset, |
| 996 | | | packet_info * pinfo, proto_tree * parent_tree, |
| 997 | | | guint8 * drep) |
| 998 | | | { |
| 999 | | | proto_item *item = NULL; |
| 1000 | | | proto_tree *tree = NULL; |
| 1001 | | | int old_offset = offset; |
| 1002 | | | guint32 st; |
| 1003 | | | dcerpc_info *di; |
| 1004 | | | const char *status; |
| 1005 | | | #define error_status_ok 0 |
| 1006 | | | |
| 1007 | | | |
| 1008 | | | |
| 1009 | | | |
| 1010 | | | |
| 1011 | | | |
| 1012 | | | |
| 1013 | | | |
| 1014 | | | |
| 1015 | | | |
| 1016 | | | |
| 1017 | | | |
| 1018 | | | di = pinfo->private_data; |
| 1019 | | | if (di->conformant_run) |
| 1020 | | | { |
| 1021 | | | return offset; |
| 1022 | | | } |
| 1023 | | | |
| 1024 | | | if (parent_tree) |
| 1025 | | | { |
| 1026 | | | item = proto_tree_add_text (parent_tree, tvb, offset, -1, |
| 1027 | | | "rs_pgo_query_result_t"); |
| 1028 | | | tree = proto_item_add_subtree (item, ett_rs_pgo_query_result_t); |
| 1029 | | | } |
| 1030 | | | |
| 1031 | | | offset = |
| 1032 | | | dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, |
| 1033 | | | hf_rs_pgo_query_result_t, &st); |
| 1034 | | | status = 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 |
|
| 1035 | | | |
| 1036 | | | if (check_col (pinfo->cinfo, COL_INFO)) |
Event 2:
Skipping " if". check_col(...) evaluates to false.
hide
|
|
| 1037 | | | col_append_fstr (pinfo->cinfo, COL_INFO, " status:%s ", status); |
| 1038 | | | |
| 1039 | | | offset += 4; |
| 1040 | | | |
| 1041 | | | switch (st) |
Event 3:
Executing default case.
hide
|
|
| 1042 | | | { |
| 1043 | | | case error_status_ok: |
| 1044 | | | offset = dissect_rs_pgo_result_t (tvb, offset, pinfo, tree, drep); |
| 1045 | | | break; |
| 1046 | | | default: |
| 1047 | | | ; |
| 1048 | | | |
| 1049 | | | } |
| 1050 | | | |
| 1051 | | | proto_item_set_len (item, offset - old_offset); |
| 1052 | | | return offset; |
| 1053 | | | } |
| |