Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77e0be12 authored by Sigmund Augdal Helberg's avatar Sigmund Augdal Helberg Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (4176): Bug-fix: Fix memory overflow



Do not overflow kernel memory when more than BT878_MAX devices are 
present.

Signed-off-by: default avatarSigmund Augdal Helberg <sigmund@snap.tv>
Signed-off-by: default avatarManu Abraham <manu@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent b32474cb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;