projects
/
linux-flexiantxendom0-natty.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ALSA: sound/pci/asihpi: check adapter index in hpi_ioctl
[linux-flexiantxendom0-natty.git]
/
sound
/
pci
/
asihpi
/
hpioctl.c
diff --git
a/sound/pci/asihpi/hpioctl.c
b/sound/pci/asihpi/hpioctl.c
index
22dbd91
..
448dd01
100644
(file)
--- a/
sound/pci/asihpi/hpioctl.c
+++ b/
sound/pci/asihpi/hpioctl.c
@@
-155,6
+155,11
@@
long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
goto out;
}
+ if (hm->h.adapter_index >= HPI_MAX_ADAPTERS) {
+ err = -EINVAL;
+ goto out;
+ }
+
pa = &adapters[hm->h.adapter_index];
hr->h.size = 0;
if (hm->h.object == HPI_OBJ_SUBSYSTEM) {