Commit 4fe055ec authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

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: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent ff05cf09
...@@ -429,7 +429,7 @@ wbcir_irq_tx(struct wbcir_data *data) ...@@ -429,7 +429,7 @@ wbcir_irq_tx(struct wbcir_data *data)
bytes[used] = byte; 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++; data->txoff++;
if (used == 0) { if (used == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment