projects
/
blktrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae2dc05
)
Fix potential array overrun in act_to_str
author
Eric Sandeen
<sandeen@redhat.com>
Fri, 16 Dec 2011 19:06:31 +0000
(13:06 -0600)
committer
Jens Axboe
<jaxboe@fusionio.com>
Wed, 1 Feb 2012 12:14:26 +0000
(13:14 +0100)
The acts[] array is only N_ACTS elements, so we should not
ever set acts[N_ACTS]
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
blkrawverify.c
patch
|
blob
|
blame
|
history
diff --git
a/blkrawverify.c
b/blkrawverify.c
index b6ceb9d08e7acac4377f292ecf88ccb930ea0b7e..4638eb7330f3320eebcb0180bada70db9dc3f795 100644
(file)
--- a/
blkrawverify.c
+++ b/
blkrawverify.c
@@
-87,7
+87,7
@@
static char *act_to_str(__u32 action)
unsigned int act = action & 0xffff;
unsigned int trace = (action >> BLK_TC_SHIFT) & 0xffff;
- if (act <
=
N_ACTS) {
+ if (act < N_ACTS) {
sprintf(buf, "%s ", acts[act].string);
for (i = 0; i < N_TRACES; i++)
if (trace & (1 << i)) {