summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/av7110/av7110.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/av7110/av7110.c b/linux/drivers/media/dvb/av7110/av7110.c
index 40d6e1abf..f0c75b5e5 100644
--- a/linux/drivers/media/dvb/av7110/av7110.c
+++ b/linux/drivers/media/dvb/av7110/av7110.c
@@ -731,6 +731,8 @@ TTBStop(av7110_t *av7110)
#define TS_WIDTH (4*188)
#define TS_HEIGHT (1024/4)
+#define TS_BUFLEN (TS_WIDTH*TS_HEIGHT)
+
static int
TTBStart(av7110_t *av7110)
{
@@ -970,6 +972,11 @@ void fidbirq (unsigned long data)
dmapos=saa7146_read(av7110->dev, PCI_VDP3);
dmapos-=(dmapos%188);
+ if (dmapos>=TS_BUFLEN) {
+ DEB_S(("bogus dmapos value ignored, av7110: %p\n",av7110));
+ return;
+ }
+
if (av7110->tsf) {
mem+=av7110->ttbp;
if (dmapos<0x20000) {