Skip to content

Commit

Permalink
[media] DVB: dvb_frontend: off by one in dtv_property_dump()
Browse files Browse the repository at this point in the history
If the tvp->cmd == DTV_MAX_COMMAND then we read past the end of the
array.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 0cf8af5 commit bca3ba7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bca3ba7

Please sign in to comment.