Skip to content

Commit

Permalink
V4L/DVB (4176): Bug-fix: Fix memory overflow
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sigmund Augdal Helberg authored and Mauro Carvalho Chehab committed Jun 25, 2006
1 parent b32474c commit 77e0be1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/media/dvb/bt8xx/bt878.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 77e0be1

Please sign in to comment.