From 2d4888dd08f5f340019ace5050a64a85dec57400 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Sun, 12 Mar 2017 20:39:52 +0100 Subject: unixsocket: fix a potential string overflow Change-Id: I8e3ec741247d728232f8c07c94eb63f068597d80 Found-by: coverity --- src/input/unixsocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ 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); -- cgit v1.2.3