Replace all unimplemented!() panics with proper error returns across URB, HID, and host handlers. Replace assert!() panics with error returns in response serialization and string pool. Validate direction field at runtime instead of only in debug builds. Add allocation bounds checks to read_from_socket, read timeout to URB loop, and clamp transfer_buffer_length to u16::MAX for control transfers. Use correct USB/IP error status codes in submit failure responses. Propagate control OUT transfer errors instead of swallowing them. Fix compilation errors and doc comment copy-paste issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cdc_acm_serial.rs | ||
| hid_keyboard.rs | ||
| host.rs | ||