Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cdc_ncm: fix divide-by-zero caused by invalid wMaxPacketSize
Endpoints with zero wMaxPacketSize are not usable for transferring data. Ignore such endpoints when looking for valid in, out and status pipes, to make the driver more robust against invalid and meaningless descriptors. The wMaxPacketSize of the out pipe is used as divisor. So this change fixes a divide-by-zero bug. Reported-by: [email protected] Signed-off-by: Bjørn Mork <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
- Loading branch information