commit | 2d4888dd08f5f340019ace5050a64a85dec57400 | [log] [tgz] |
---|---|---|
author | Alexander Couzens <lynxis@fe80.eu> | Sun Mar 12 20:39:52 2017 +0100 |
committer | Alexander Couzens <lynxis@fe80.eu> | Tue Nov 21 11:57:01 2017 +0100 |
tree | bcb78b1a69b6fca1528dfdc5965c15827c4ea06c | |
parent | 2e05f883f92909bb1a29b9b912d5c24200394839 [diff] |
unixsocket: fix a potential string overflow Change-Id: I8e3ec741247d728232f8c07c94eb63f068597d80 Found-by: coverity
diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c index 03e2909..c49928d 100644 --- a/src/input/unixsocket.c +++ b/src/input/unixsocket.c
@@ -233,7 +233,7 @@ 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);