openrc-run: fix memory size (#213)

Fixes #212
This commit is contained in:
Chris Cromer 2018-03-01 21:31:33 -03:00 committed by Doug Freed
parent 109869641f
commit b46123f2e1

View File

@ -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);