summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-core
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-10-03 10:50:00 -0400
committerSteven Toth <stoth@linuxtv.org>2008-10-03 10:50:00 -0400
commit0dce716d8bb66f3d609fa9b509a3102c0a4d589e (patch)
tree47584d3124bae547d33b7c54cb1b910a003d761f /linux/drivers/media/dvb/dvb-core
parent9d14924907faff9610c7cefa39f689220c36c2bf (diff)
downloadmediapointer-dvb-s2-0dce716d8bb66f3d609fa9b509a3102c0a4d589e.tar.gz
mediapointer-dvb-s2-0dce716d8bb66f3d609fa9b509a3102c0a4d589e.tar.bz2
S2API: Stop an OOPS if illegal commands are dumped in S2API.
From: Darron Broad <darron@kewl.org> Quick fix to stop an OOPS if illegal commands are dumped in S2API. Priority: normal Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Darron Broad <darron@kewl.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 6f0dc252f..3e9cbac17 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -918,6 +918,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