(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-h264.c) |
| |
| 2046 | | | proto_reg_handoff_h264(void) |
| 2047 | | | { |
| 2048 | | | static dissector_handle_t h264_handle; |
| 2049 | | | static guint dynamic_payload_type; |
| 2050 | | | static gboolean h264_prefs_initialized = FALSE; |
| 2051 | | | |
| 2052 | | | if (!h264_prefs_initialized) { |
| 2053 | | | dissector_handle_t h264_name_handle; |
| 2054 | | | h264_capability_t *ftr; |
| 2055 | | | |
| 2056 | | | h264_handle = find_dissector("h264"); |
| 2057 | | | dissector_add_string("rtp_dyn_payload_type","H264", h264_handle); |
| 2058 | | | |
| 2059 | | | h264_name_handle = create_dissector_handle(dissect_h264_name, proto_h264); |
Ignored Return Value
The return value of create_dissector_handle() 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 create_dissector_handle() is checked 99% 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 create_dissector_handle() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 2060 | | | for (ftr=h264_capability_tab; ftr->id; ftr++) { |
| 2061 | | | if (ftr->name) |
| 2062 | | | dissector_add_string("h245.gef.name", ftr->id, h264_name_handle); |
| 2063 | | | if (ftr->content_pdu) |
| 2064 | | | dissector_add_string("h245.gef.content", ftr->id, new_create_dissector_handle(ftr->content_pdu, proto_h264)); |
| 2065 | | | } |
| 2066 | | | h264_prefs_initialized = TRUE; |
Event 3:
!0 evaluates to true.
hide
|
|
| 2067 | | | } else { |
| 2068 | | | if ( dynamic_payload_type > 95 ) |
| 2069 | | | dissector_delete("rtp.pt", dynamic_payload_type, h264_handle); |
| 2070 | | | } |
| 2071 | | | |
| 2072 | | | dynamic_payload_type = temp_dynamic_payload_type; |
| 2073 | | | if ( dynamic_payload_type > 95 ){ |
Event 4:
Taking true branch. dynamic_payload_type > 95 evaluates to true.
hide
|
|
| 2074 | | | dissector_add("rtp.pt", dynamic_payload_type, h264_handle); |
| 2075 | | | } |
| 2076 | | | } |
| |