projects
/
platform
/
kernel
/
linux-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88a28c8
)
Staging: comedi: s626: Possible read buffer overflow fix
author
Roel Kluin
<roel.kluin@gmail.com>
Fri, 7 Aug 2009 22:14:20 +0000
(
00:14
+0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 15 Sep 2009 19:01:34 +0000
(12:01 -0700)
If `cmd->chanlist_len' is 0, then we write ppl[-1].
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/s626.c
patch
|
blob
|
history
diff --git
a/drivers/staging/comedi/drivers/s626.c
b/drivers/staging/comedi/drivers/s626.c
index
6549d11
..
80d2787
100644
(file)
--- a/
drivers/staging/comedi/drivers/s626.c
+++ b/
drivers/staging/comedi/drivers/s626.c
@@
-1707,7
+1707,8
@@
static int s626_ai_load_polllist(uint8_t * ppl, struct comedi_cmd *cmd)
else
ppl[n] = (CR_CHAN((cmd->chanlist)[n])) | (RANGE_10V);
}
- ppl[n - 1] |= EOPL;
+ if (n != 0)
+ ppl[n - 1] |= EOPL;
return n;
}