summaryrefslogtreecommitdiff
path: root/pkg/rootless
diff options
context:
space:
mode:
authorErik Sjölund <erik.sjolund@gmail.com>2019-08-11 16:44:26 +0200
committerErik Sjölund <erik.sjolund@gmail.com>2019-08-11 16:44:26 +0200
commit39ce3626e09cbfc2b77bd23bb65b875b04d9df40 (patch)
tree86fa785790ab32b17f834c68c0d7936dbd210806 /pkg/rootless
parent3bc861cb110603ab9ece8526a4a962a31222add4 (diff)
downloadpodman-39ce3626e09cbfc2b77bd23bb65b875b04d9df40.tar.gz
podman-39ce3626e09cbfc2b77bd23bb65b875b04d9df40.tar.bz2
podman-39ce3626e09cbfc2b77bd23bb65b875b04d9df40.zip
Adjust read count so that a newline can be added afterwards
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
Diffstat (limited to 'pkg/rootless')
-rw-r--r--pkg/rootless/rootless_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index f5d7e4711..20c68db0f 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -276,7 +276,7 @@ static void __attribute__((constructor)) init()
return;
}
- r = TEMP_FAILURE_RETRY (read (fd, buf, sizeof (buf)));
+ r = TEMP_FAILURE_RETRY (read (fd, buf, sizeof (buf) - 1));
close (fd);
if (r < 0)
{