commit: 05cfbb8348cf92bcc2edd922af1dc0a4c4c2e1f4 Author: Chris Cromer <cromerc <AT> users <DOT> noreply <DOT> github <DOT> com> AuthorDate: Fri Mar 2 00:31:33 2018 +0000 Commit: William Hubbs <williamh <AT> gentoo <DOT> org> CommitDate: Fri Mar 2 00:33:02 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=05cfbb83
openrc-run: fix memory size (#213) Fixes #212 src/rc/openrc-run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);