aboutsummaryrefslogtreecommitdiffstats
path: root/src/faudit
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2019-07-17 18:54:51 +0200
committerLibravatar GitHub <noreply@github.com>2019-07-17 18:54:51 +0200
commitcac87558fd78304eb9439ea77a44a8fa7a2a9dde (patch)
tree32edf3cfa7b4b209fbfa38df33157df87d6ed434 /src/faudit
parentpackaging badge (diff)
downloadfirejail-cac87558fd78304eb9439ea77a44a8fa7a2a9dde.tar.gz
firejail-cac87558fd78304eb9439ea77a44a8fa7a2a9dde.tar.zst
firejail-cac87558fd78304eb9439ea77a44a8fa7a2a9dde.zip
faudit: fix gcc stringop-truncation warning
Diffstat (limited to 'src/faudit')
-rw-r--r--src/faudit/dbus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/faudit/dbus.c b/src/faudit/dbus.c
index 2971ea55b..2e4a7550b 100644
--- a/src/faudit/dbus.c
+++ b/src/faudit/dbus.c
@@ -35,7 +35,7 @@ int check_unix(const char *sockfile) {
35 struct sockaddr_un remote; 35 struct sockaddr_un remote;
36 memset(&remote, 0, sizeof(struct sockaddr_un)); 36 memset(&remote, 0, sizeof(struct sockaddr_un));
37 remote.sun_family = AF_UNIX; 37 remote.sun_family = AF_UNIX;
38 strncpy(remote.sun_path, sockfile, sizeof(remote.sun_path)); 38 strncpy(remote.sun_path, sockfile, sizeof(remote.sun_path) - 1);
39 int len = strlen(remote.sun_path) + sizeof(remote.sun_family); 39 int len = strlen(remote.sun_path) + sizeof(remote.sun_family);
40 if (*sockfile == '@') 40 if (*sockfile == '@')
41 remote.sun_path[0] = '\0'; 41 remote.sun_path[0] = '\0';