summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-05-26 12:44:52 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-28 00:55:55 +0400
commitbca3ba7904426bb94ee1a91e6e88831483fb5d53 (patch)
treedfd43f08b52fd6b129c617d3094bdb8126f11e65
parent0cf8af57f1865148efcb40a43ddd04d5a709820e (diff)
downloadlinux-bca3ba7904426bb94ee1a91e6e88831483fb5d53.tar.xz
[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: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index efe9c30605e8..21c9072ed99f 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -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;