aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Cromer <cromerc@users.noreply.github.com>2018-03-01 21:31:33 -0300
committerDoug Freed <dwfreed@mtu.edu>2018-03-01 19:31:33 -0500
commitb46123f2e19a5eb8dc02b898e8c20a2ccc211615 (patch)
tree5b21af5b57d389989fe6877dfde90a6a6ebc722e
parent109869641f7b58d07819f6b65d7b085abf75083b (diff)
openrc-run: fix memory size (#213)
Fixes #212
-rw-r--r--src/rc/openrc-run.c2
1 files changed, 1 insertions, 1 deletions
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);