[PATCH] fix array overrun in drivers/char/mwave/mwavedd.c
this fixes coverity id #489. Since the last element in the array is always ARRAY_SIZE-1 we have to check for ipcnum >= ARRAY_SIZE() Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
1ac3836ce6
commit
d698f1c726
1 changed files with 1 additions and 1 deletions
|
@ -271,7 +271,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
|
|||
ipcnum,
|
||||
pDrvData->IPCs[ipcnum].usIntCount);
|
||||
|
||||
if (ipcnum > ARRAY_SIZE(pDrvData->IPCs)) {
|
||||
if (ipcnum >= ARRAY_SIZE(pDrvData->IPCs)) {
|
||||
PRINTK_ERROR(KERN_ERR_MWAVE
|
||||
"mwavedd::mwave_ioctl:"
|
||||
" IOCTL_MW_REGISTER_IPC:"
|
||||
|
|
Loading…
Reference in a new issue