提交 38e35a85 编写于 作者: S Sean Young 提交者: Mauro Carvalho Chehab

[media] redrat3: ensure whole packet is read

The length in the header excludes the header itself, so we're getting
spurious readings.
Signed-off-by: NSean Young <sean@mess.org>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 a354177f
......@@ -663,7 +663,8 @@ static int redrat3_get_ir_data(struct redrat3_dev *rr3, unsigned len)
goto out;
}
if (rr3->bytes_read < be16_to_cpu(rr3->irdata.header.length))
if (rr3->bytes_read < be16_to_cpu(rr3->irdata.header.length) +
sizeof(struct redrat3_header))
/* we're still accumulating data */
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册