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

Commit bca3ba79 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab
Browse files

[media] DVB: dvb_frontend: off by one in dtv_property_dump()



If the tvp->cmd == DTV_MAX_COMMAND then we read past the end of the
array.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0cf8af57
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -982,7 +982,7 @@ static void dtv_property_dump(struct dtv_property *tvp)
{
	int i;

	if (tvp->cmd <= 0 || tvp->cmd > DTV_MAX_COMMAND) {
	if (tvp->cmd <= 0 || tvp->cmd >= DTV_MAX_COMMAND) {
		printk(KERN_WARNING "%s: tvp.cmd = 0x%08x undefined\n",
			__func__, tvp->cmd);
		return;