[PATCH] libosmo-abis[master]: unixsocket: fix a potential string overflow

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Tue Nov 21 10:57:10 UTC 2017


Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/4213

to look at the new patch set (#2).

unixsocket: fix a potential string overflow

Change-Id: I8e3ec741247d728232f8c07c94eb63f068597d80
Found-by: coverity
---
M src/input/unixsocket.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/13/4213/2

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);

-- 
To view, visit https://gerrit.osmocom.org/4213
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8e3ec741247d728232f8c07c94eb63f068597d80
Gerrit-PatchSet: 2
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list