projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix issue with dangling pointer in the rbd engine
[fio.git]
/
client.c
diff --git
a/client.c
b/client.c
index 05439e1d2ea9b53565fb02fb22e83a5b2fe1ad3c..af6621dc63d3e0ce7c196e1bd5daa0e747463a7d 100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-388,7
+388,7
@@
static int fio_client_connect_sock(struct fio_client *client)
memset(addr, 0, sizeof(*addr));
addr->sun_family = AF_UNIX;
- str
cpy(addr->sun_path, client->hostname
);
+ str
ncpy(addr->sun_path, client->hostname, sizeof(addr->sun_path) - 1
);
fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {