* [2.6 patch] fix array overrun in drivers/char/mwave/mwavedd.c
@ 2006-04-23 21:22 Adrian Bunk
0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2006-04-23 21:22 UTC (permalink / raw)
To: Andrew Morton; +Cc: Eric Sesterhenn, linux-kernel
From: Eric Sesterhenn <snakebyte@gmx.de>
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>
---
This patch was sent by Eric Sesterhenn on:
- 9 Apr 2006
--- linux-2.6.17-rc1/drivers/char/mwave/mwavedd.c.orig 2006-04-09 19:45:54.000000000 +0200
+++ linux-2.6.17-rc1/drivers/char/mwave/mwavedd.c 2006-04-09 19:46:07.000000000 +0200
@@ -271,7 +271,7 @@ static int mwave_ioctl(struct inode *ino
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:"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-04-23 21:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-23 21:22 [2.6 patch] fix array overrun in drivers/char/mwave/mwavedd.c Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox