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
|
@ -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 New Issue