"DISK_UTIL",
"SERVER_START",
"ADD_JOB",
- "CMD_RUN"
+ "CMD_RUN",
"CMD_IOLOG",
};
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
- strcpy(addr.sun_path, bind_sock);
+ strncpy(addr.sun_path, bind_sock, sizeof(addr.sun_path) - 1);
len = sizeof(addr.sun_family) + strlen(bind_sock) + 1;
if (sk < 0)
return sk;
+ memset(bind_str, 0, sizeof(bind_str));
+
if (!bind_sock) {
char *p, port[16];
const void *src;
if (p)
strcat(p, port);
else
- strcpy(bind_str, port);
+ strncpy(bind_str, port, sizeof(bind_str) - 1);
} else
- strcpy(bind_str, bind_sock);
+ strncpy(bind_str, bind_sock, sizeof(bind_str) - 1);
log_info("fio: server listening on %s\n", bind_str);