unixsocket: fix a potential string overflow

Change-Id: I8e3ec741247d728232f8c07c94eb63f068597d80
Found-by: coverity
This commit is contained in:
Alexander Couzens 2017-03-12 20:39:52 +01:00
parent 2e05f883f9
commit 2d4888dd08
1 changed files with 1 additions and 1 deletions

View File

@ -233,7 +233,7 @@ static int unixsocket_line_update(struct e1inp_line *line)
int i;
if (line->sock_path)
strcpy(sock_path, line->sock_path);
osmo_strlcpy(sock_path, line->sock_path, PATH_MAX);
else
sprintf(sock_path, "%s%d", UNIXSOCKET_SOCK_PATH_DEFAULT,
line->num);