| Age | Commit message (Collapse) | Author |
|
V641
temp_buf is a uint16_t[128] reused to hold the GET_DESCRIPTOR(Configuration)
wire-format blob; casting it to tusb_desc_configuration_t* to read the 9-byte
header tripped PVS V641 (buffer size not a multiple of the element size).
Route the cast through uintptr_t so the (correct) header read no longer trips
the size-ratio heuristic, dropping the inline //-V641 suppression.
Verified: pico examples rebuild; single-TU PVS re-run on bare_api/main.c is
clean (no V641, no MISRA pointer/integer-cast finding).
|
|
Resolves all TinyUSB-owned alerts reported by the CI PVS-Studio job
(static_analysis.yml, run with --security-related-issues) on the
raspberry_pi_pico board: 0 remaining in src/ and examples/.
Genuine fixes:
- ncm_device: validate wNdpIndex against sizeof(nth16_t), not the pointer
size sizeof(nth16) (4 bytes) — the latter under-checks the NTB header
(V568).
- tusb: drop the redundant `ff_buf != NULL && ff_bufsize > 0` guard in
tu_edpt_stream_init(); the early return already guarantees it (V560).
- midi_host: bounds-check idx in tuh_midi_itf_get_info() instead of the
always-true `&_midi_host[idx]` pointer (V560).
- examples: fully initialize resolutions_per_format / frame_num /
interval_ms arrays instead of leaving trailing elements implicitly zero
(V1009).
False positives suppressed at the cause:
- usbd/usbh: hide the weak dcd_deinit()/hcd_deinit() stubs from the
analyzer with #ifndef PVS_STUDIO. PVS analyzes one TU at a time and
binds the call to the always-false weak stub (it cannot model the
linker selecting the port's strong definition), then reports the
cleanup loop after TU_ASSERT(...deinit()) as unreachable (V779).
False positives suppressed locally (inline //-V or .pvsconfig):
- .pvsconfig: V501 (HID descriptor macros), V763 (rhport override),
V785 (audio function-index switch), V1044 (hardware poll loops).
- inline //-V for config-dependent or intentional constructs: V512,
V514-style contiguous clears, V547, V557, V560, V614, V619, V641,
V1008, V1037, V1048, V1086.
Verified: all examples build for raspberry_pi_pico; ceedling test:all
passes (60/60); re-run of the CI-exact PVS invocation reports zero
TinyUSB-owned findings.
|
|
task is blocking
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
|
|
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
implement hcd_edpt_close() for pio-usb and max3421e, also move max3421e api into its own header.
|
|
|
|
consistent
|
|
|
|
update tusb_init() to take rhport and role, defined as macro with optional argument for backward compatible
|
|
|
|
Remove redundant header file includes for the hid class
|
|
|
|
|
|
|
|
- fix warnings build hcd max3421 with rp2040
- add tinyusb_host_max3421 target for rp2040 cmake, -DMAX3421_HOST=1
will enable this
- add max3421 driver implementation for rp2040 family
- update tusb_config for host to allow easy enable host selection for
rp2040 (default/pio-usb/max3421)
|
|
Enhance bsp
|
|
fix example of bare_api, check empty string
|
|
|
|
|
|
add BOARD_UPPERCASE for board detection
|
|
|
|
|
|
temporarily disable codespell
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
move usbh_edpt_open() to public API, remove rhport from its signature
|
|
|
|
|
|
remove tuh_control_xfer_sync()
|
|
|
|
|
|
|
|
|
|
- add synchronous version of all get descriptor API
- update bare example to use sync API for string descriptor
- change order of index, language_id in tuh_descriptor_get_string() to
match similar API of libusb
- add index to tuh_descriptor_get_hid_report()
|
|
- change API of tuh_control_xfer and its callback
- rename tuh_control_complete_cb_t to tuh_control_xfer_cb_t
- add user argument to control callback
- migrate usbh and hub
|
|
|
|
|
|
|
|
|