summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-05-26 05:44:52 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 17:55:55 -0300
commitbca3ba7904426bb94ee1a91e6e88831483fb5d53 (patch)
treedfd43f08b52fd6b129c617d3094bdb8126f11e65 /drivers/media
parent0cf8af57f1865148efcb40a43ddd04d5a709820e (diff)
downloadop-kernel-dev-bca3ba7904426bb94ee1a91e6e88831483fb5d53.zip
op-kernel-dev-bca3ba7904426bb94ee1a91e6e88831483fb5d53.tar.gz
[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>
Diffstat (limited to 'drivers/media')
-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 efe9c30..21c9072 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;
OpenPOWER on IntegriCloud