From 9acfdb15ab1b939b4ee9f764206598b83e4f4422 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 14 Oct 2011 17:20:14 +0200 Subject: Fix off-by-one error in remove_socket_symlink() https://fedorahosted.org/sssd/ticket/1043 --- src/sbus/sssd_dbus_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sbus/sssd_dbus_server.c b/src/sbus/sssd_dbus_server.c index 759eb69f7..5366e8072 100644 --- a/src/sbus/sssd_dbus_server.c +++ b/src/sbus/sssd_dbus_server.c @@ -132,7 +132,7 @@ remove_socket_symlink(const char *symlink_name) ssize_t numread = 0; errno = 0; - numread = readlink(symlink_name, target, PATH_MAX); + numread = readlink(symlink_name, target, PATH_MAX-1); if (numread < 0) { ret = errno; DEBUG(2, ("readlink failed [%d]: %s\n", ret, strerror(ret))); -- cgit