aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/mwave
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-09-30 23:28:05 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 00:39:24 -0700
commit095d030cff0eafd29ee31e022d374874146a5b4c (patch)
treecec6f1906b77ed55f71933bd090097487d5da976 /drivers/char/mwave
parent1cfee2b3c21d71a8c20884dbb77ed343558db87f (diff)
downloadlinux-095d030cff0eafd29ee31e022d374874146a5b4c.tar.gz
[PATCH] Off-by-one in drivers/char/mwave/mwavedd.c
This fixes two off by ones in the mwave driver, found via find -iname \*.[ch] | xargs grep "> ARRAY_SIZE(" Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/mwave')
-rw-r--r--drivers/char/mwave/mwavedd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/mwave/mwavedd.c b/drivers/char/mwave/mwavedd.c
index 39a2e661ff5..8d14823b051 100644
--- a/drivers/char/mwave/mwavedd.c
+++ b/drivers/char/mwave/mwavedd.c
@@ -297,7 +297,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
" ipcnum %x, usIntCount %x\n",
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_GET_IPC: Error:"
@@ -355,7 +355,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
"mwavedd::mwave_ioctl IOCTL_MW_UNREGISTER_IPC"
" ipcnum %x\n",
ipcnum);
- if (ipcnum > ARRAY_SIZE(pDrvData->IPCs)) {
+ if (ipcnum >= ARRAY_SIZE(pDrvData->IPCs)) {
PRINTK_ERROR(KERN_ERR_MWAVE
"mwavedd::mwave_ioctl:"
" IOCTL_MW_UNREGISTER_IPC:"