mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
media: winbond-cir: buffer overrun during transmit
We're reading beyond the buffer before checking its length. BUG: KASAN: slab-out-of-bounds in wbcir_irq_tx Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
ff05cf0937
commit
4fe055ecfc
1 changed files with 1 additions and 1 deletions
|
|
@ -429,7 +429,7 @@ wbcir_irq_tx(struct wbcir_data *data)
|
|||
bytes[used] = byte;
|
||||
}
|
||||
|
||||
while (data->txbuf[data->txoff] == 0 && data->txoff != data->txlen)
|
||||
while (data->txoff != data->txlen && data->txbuf[data->txoff] == 0)
|
||||
data->txoff++;
|
||||
|
||||
if (used == 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue