mt76: usb: check urb->num_sgs limit in mt76u_process_rx_entry
authorLorenzo Bianconi <lorenzo@kernel.org>
Wed, 20 Feb 2019 09:20:37 +0000 (10:20 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 26 Feb 2019 11:29:56 +0000 (12:29 +0100)
commit200abe6a963a8720397f7156403ff14d09457704
treee98c14b8352a1f93245bf52e8ea13195754243eb
parent04eb16fc70164c03ad84b7eb287c55dfbfc5e4e6
mt76: usb: check urb->num_sgs limit in mt76u_process_rx_entry

check nsgs value is less than urb->num_sgs in mt76u_process_rx_entry
in order to avoid an out-of-bound access of urb->sg array

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/usb.c