diff options
author | Sigmund Augdal Helberg <sigmund@snap.tv> | 2006-06-21 09:35:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 01:05:19 -0400 |
commit | 77e0be12100a3d40abfa46ef54c323b6cfff41ed (patch) | |
tree | e0fd08dc93099a49e999404328fefc9082c64a9c /drivers/media | |
parent | b32474cb8341bb828f2c2800d5dd615b7cd02182 (diff) |
V4L/DVB (4176): Bug-fix: Fix memory overflow
Do not overflow kernel memory when more than BT878_MAX devices are
present.
Signed-off-by: Sigmund Augdal Helberg <sigmund@snap.tv>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/bt8xx/bt878.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c index 5500f8a0ffe2..47281c905149 100644 --- a/drivers/media/dvb/bt8xx/bt878.c +++ b/drivers/media/dvb/bt8xx/bt878.c | |||
@@ -417,6 +417,11 @@ static int __devinit bt878_probe(struct pci_dev *dev, | |||
417 | 417 | ||
418 | printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n", | 418 | printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n", |
419 | bt878_num); | 419 | bt878_num); |
420 | if (bt878_num >= BT878_MAX) { | ||
421 | printk(KERN_ERR "bt878: Too many devices inserted\n"); | ||
422 | result = -ENOMEM; | ||
423 | goto fail0; | ||
424 | } | ||
420 | if (pci_enable_device(dev)) | 425 | if (pci_enable_device(dev)) |
421 | return -EIO; | 426 | return -EIO; |
422 | 427 | ||