projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6be0696
)
Fix crash with multiple files
author
Carl Henrik Lunde
<chlunde@ping.uio.no>
Mon, 20 Apr 2009 06:41:37 +0000
(08:41 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Mon, 20 Apr 2009 06:41:37 +0000
(08:41 +0200)
There's an off-by-one in add_file() when it calculates the size
for the file array.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index af23191fb33d9f78442ba24992024c332fa969bd..04d7b987085f00eb2e195e8a469d39adffede7b4 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-686,7
+686,7
@@
int add_file(struct thread_data *td, const char *fname)
f->fd = -1;
if (td->files_size <= td->files_index) {
- int new_size = td->o.nr_files;
+ int new_size = td->o.nr_files
+ 1
;
dprint(FD_FILE, "resize file array to %d files\n", new_size);