diff options
author | Manu Abraham <manu@linuxtv.org> | 2006-06-21 17:35:48 +0400 |
---|---|---|
committer | Manu Abraham <manu@linuxtv.org> | 2006-06-21 17:35:48 +0400 |
commit | 7aa19975d2e6a91609299655e42a1f565b19fb84 (patch) | |
tree | a96281af9e9c4fce8a19fc8405f54342d7bfab7d /linux/drivers/media/dvb | |
parent | 56256e69f16c31749cfa94ef90fee9481615d798 (diff) | |
download | mediapointer-dvb-s2-7aa19975d2e6a91609299655e42a1f565b19fb84.tar.gz mediapointer-dvb-s2-7aa19975d2e6a91609299655e42a1f565b19fb84.tar.bz2 |
Bug-fix: Do not overflow kernel memory when more than BT878_MAX devices are present
From: Sigmund Augdal Helberg <sigmund@snap.tv>
Signed-off-by: Sigmund Augdal Helberg <sigmund@snap.tv>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/bt878.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/bt878.c b/linux/drivers/media/dvb/bt8xx/bt878.c index 5500f8a0f..47281c905 100644 --- a/linux/drivers/media/dvb/bt8xx/bt878.c +++ b/linux/drivers/media/dvb/bt8xx/bt878.c @@ -417,6 +417,11 @@ static int __devinit bt878_probe(struct pci_dev *dev, printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n", bt878_num); + if (bt878_num >= BT878_MAX) { + printk(KERN_ERR "bt878: Too many devices inserted\n"); + result = -ENOMEM; + goto fail0; + } if (pci_enable_device(dev)) return -EIO; |