DVB: dvb_frontend: off by one in dtv_property_dump()
Commit Message
If the tvp->cmd == DTV_MAX_COMMAND then we read past the end of the
array.
Signed-off-by: Dan Carpenter <error27@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -981,7 +981,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;