diff options
author | Dan Carpenter <error27@gmail.com> | 2011-05-26 05:44:52 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 17:55:55 -0300 |
commit | bca3ba7904426bb94ee1a91e6e88831483fb5d53 (patch) | |
tree | dfd43f08b52fd6b129c617d3094bdb8126f11e65 /drivers/media | |
parent | 0cf8af57f1865148efcb40a43ddd04d5a709820e (diff) |
[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.c | 2 |
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 efe9c30605e..21c9072ed99 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; |