From b46123f2e19a5eb8dc02b898e8c20a2ccc211615 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Thu, 1 Mar 2018 21:31:33 -0300 Subject: openrc-run: fix memory size (#213) Fixes #212 --- src/rc/openrc-run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rc/openrc-run.c') diff --git a/src/rc/openrc-run.c b/src/rc/openrc-run.c index daeafc52..73def8fb 100644 --- a/src/rc/openrc-run.c +++ b/src/rc/openrc-run.c @@ -1152,7 +1152,7 @@ int main(int argc, char **argv) } lnk = xmalloc(4096); memset(lnk, 0, 4096); - if (readlink(argv[1], lnk, sizeof(lnk)-1)) { + if (readlink(argv[1], lnk, 4096)) { dir = dirname(path); if (strchr(lnk, '/')) { save = xstrdup(dir); -- cgit v1.2.3