diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-04-28 03:39:20 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-28 17:33:46 +0200 |
commit | d698f1c72629ff43d0cb6b9f1d17c491c057a0d9 (patch) | |
tree | c9fb0ef3caaaf35bef346b5d0d8eb671e7ee071a | |
parent | [PATCH] tipar oops fix (diff) | |
download | linux-d698f1c72629ff43d0cb6b9f1d17c491c057a0d9.tar.xz linux-d698f1c72629ff43d0cb6b9f1d17c491c057a0d9.zip |
[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>
-rw-r--r-- | drivers/char/mwave/mwavedd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/mwave/mwavedd.c b/drivers/char/mwave/mwavedd.c index 8666171e187b..d3ba2f860ef0 100644 --- a/drivers/char/mwave/mwavedd.c +++ b/drivers/char/mwave/mwavedd.c @@ -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:" |