Skip to content

Commit

Permalink
V4L/DVB (9171): S2API: Stop an OOPS if illegal commands are dumped in…
Browse files Browse the repository at this point in the history
… S2API.

Quick fix to stop an OOPS if illegal commands are dumped in S2API.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Darron Broad authored and Mauro Carvalho Chehab committed Oct 13, 2008
1 parent 01a8f03 commit 4aae8ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,13 @@ void dtv_property_dump(struct dtv_property *tvp)
{
int i;

if( (tvp->cmd <= 0 || tvp->cmd > DTV_DELIVERY_SYSTEM) &&
tvp->cmd != DTV_API_VERSION) {
printk("%s: tvp.cmd = 0x%08x (undefined/unknown/invalid)\n",
__func__, tvp->cmd);
return;
}

printk("%s() tvp.cmd = 0x%08x (%s)\n"
,__FUNCTION__
,tvp->cmd
Expand Down

0 comments on commit 4aae8ef

Please sign in to comment.