summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-11 19:22:59 +0200
committerGitHub <noreply@github.com>2019-08-11 19:22:59 +0200
commit7bbaa36a13a831fa5804f388a23522a5303dd9db (patch)
tree86fa785790ab32b17f834c68c0d7936dbd210806
parent3bc861cb110603ab9ece8526a4a962a31222add4 (diff)
parent39ce3626e09cbfc2b77bd23bb65b875b04d9df40 (diff)
downloadpodman-7bbaa36a13a831fa5804f388a23522a5303dd9db.tar.gz
podman-7bbaa36a13a831fa5804f388a23522a5303dd9db.tar.bz2
podman-7bbaa36a13a831fa5804f388a23522a5303dd9db.zip
Merge pull request #3783 from eriksjolund/fix_read_count
Adjust read count so that a newline can be added afterwards
-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)
{