Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38e35a85 authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent a354177f
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -663,7 +663,8 @@ static int redrat3_get_ir_data(struct redrat3_dev *rr3, unsigned len)
		goto out;
		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 */
		/* we're still accumulating data */
		return 0;
		return 0;