projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Null terminate before (or after) strncpy(3)
[fio.git]
/
ioengines.c
diff --git
a/ioengines.c
b/ioengines.c
index 918b50ad2bf27dafc0d69f9750d106aad29e2fa4..f7b5ed6bf38776e4240ffaff7f80fab8063a06a9 100644
(file)
--- a/
ioengines.c
+++ b/
ioengines.c
@@
-130,6
+130,7
@@
struct ioengine_ops *load_ioengine(struct thread_data *td, const char *name)
dprint(FD_IO, "load ioengine %s\n", name);
+ engine[sizeof(engine) - 1] = '\0';
strncpy(engine, name, sizeof(engine) - 1);
/*