dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Sigmund Augdal Helberg 2006-06-21 10:35:48 -03:00 committed by Mauro Carvalho Chehab
parent b32474cb83
commit 77e0be1210
1 changed files with 5 additions and 0 deletions

View File

@ -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;