(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc.c) |
| |
| 1032 | | | dissect_dcerpc_float(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, |
| 1033 | | | proto_tree *tree, guint8 *drep, |
| 1034 | | | int hfindex, gfloat *pdata) |
| 1035 | | | { |
| 1036 | | | gfloat data; |
| 1037 | | | |
| 1038 | | | |
| 1039 | | | switch(drep[1]) { |
| 1040 | | | case(DCE_RPC_DREP_FP_IEEE): |
| 1041 | | | data = ((drep[0] & 0x10) |
| 1042 | | | ? tvb_get_letohieee_float(tvb, offset) |
| 1043 | | | : tvb_get_ntohieee_float(tvb, offset)); |
Ignored Return Value
The return value of tvb_get_ntohieee_float() 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 tvb_get_ntohieee_float() is checked 97% 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 tvb_get_ntohieee_float() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 1044 | | | if (tree) { |
Event 2:
Skipping " if". tree evaluates to false.
hide
|
|
| 1045 | | | proto_tree_add_float(tree, hfindex, tvb, offset, 4, data); |
| 1046 | | | } |
| 1047 | | | break; |
| 1048 | | | case(DCE_RPC_DREP_FP_VAX): |
| 1049 | | | case(DCE_RPC_DREP_FP_CRAY): |
| 1050 | | | case(DCE_RPC_DREP_FP_IBM): |
| 1051 | | | default: |
| 1052 | | | |
| 1053 | | | |
| 1054 | | | data = -G_MAXFLOAT; |
| 1055 | | | if (tree) { |
| 1056 | | | proto_tree_add_debug_text(tree, "DCE RPC: dissection of non IEEE floating formats currently not implemented (drep=%u)!", drep[1]); |
| 1057 | | | } |
| 1058 | | | } |
| 1059 | | | if (pdata) |
Event 3:
Skipping " if". pdata evaluates to false.
hide
|
|
| 1060 | | | *pdata = data; |
| 1061 | | | return offset + 4; |
| 1062 | | | } |
| |