diff options
author | Dan Carpenter <error27@gmail.com> | 2011-05-26 12:44:52 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-28 00:55:55 +0400 |
commit | bca3ba7904426bb94ee1a91e6e88831483fb5d53 (patch) | |
tree | dfd43f08b52fd6b129c617d3094bdb8126f11e65 | |
parent | 0cf8af57f1865148efcb40a43ddd04d5a709820e (diff) | |
download | linux-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.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 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; |