Skip to content

Commit

Permalink
[media] DVB: dvb_frontend: fix dtv_property_dump for DTV_DVBT2_PLP_ID
Browse files Browse the repository at this point in the history
- Add missing entry to array "dtv_cmds".
- Set array size to DTV_MAX_COMMAND + 1 to avoid future off-by-ones.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Andreas Oberritter authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 7f116b3 commit ec05a64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe)
.buffer = b \
}

static struct dtv_cmds_h dtv_cmds[] = {
static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = {
_DTV_CMD(DTV_TUNE, 1, 0),
_DTV_CMD(DTV_CLEAR, 1, 0),

Expand Down Expand Up @@ -966,6 +966,7 @@ static struct dtv_cmds_h dtv_cmds[] = {
_DTV_CMD(DTV_ISDBT_LAYERC_TIME_INTERLEAVING, 0, 0),

_DTV_CMD(DTV_ISDBS_TS_ID, 1, 0),
_DTV_CMD(DTV_DVBT2_PLP_ID, 1, 0),

/* Get */
_DTV_CMD(DTV_DISEQC_SLAVE_REPLY, 0, 1),
Expand Down

0 comments on commit ec05a64

Please sign in to comment.