(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-smb2.c) |
| |
| 3561 | | | dissect_file_data_dcerpc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, int offset, guint32 datalen, proto_tree *top_tree) |
| 3562 | | | { |
| 3563 | | | int tvblen; |
| 3564 | | | int result; |
| 3565 | | | |
| 3566 | | | tvbuff_t *dcerpc_tvb; |
| 3567 | | | tvblen = tvb_length_remaining(tvb, offset); |
| 3568 | | | dcerpc_tvb = tvb_new_subset(tvb, offset, MIN((int)datalen, tvb_length_remaining(tvb, offset)), datalen);
x /usr/include/glib-2.0/glib/gmacros.h |
| |
201 | #define MIN(a, b) (((a) < (b)) ? (a) : (b)) |
| |
|
| 3569 | | | |
| 3570 | | | |
| 3571 | | | result = dissector_try_heuristic(smb2_heur_subdissector_list, dcerpc_tvb, pinfo, top_tree); |
Ignored Return Value
The return value of dissector_try_heuristic() 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 dissector_try_heuristic() 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 dissector_try_heuristic() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 3572 | | | |
| 3573 | | | |
| 3574 | | | offset += datalen; |
| 3575 | | | |
| 3576 | | | return offset; |
| 3577 | | | } |
| |