Unverified Commit 48cfd5db by Christian Brauner Committed by GitHub

Merge pull request #2403 from 2xsec/coverity1

coverity: #1425778
parents 40f3bd6f 40229e95
...@@ -1314,7 +1314,11 @@ static bool do_dump(struct lxc_container *c, char *mode, struct migrate_opts *op ...@@ -1314,7 +1314,11 @@ static bool do_dump(struct lxc_container *c, char *mode, struct migrate_opts *op
SYSERROR("read"); SYSERROR("read");
n = 0; n = 0;
} }
buf[n] = 0;
if (n == sizeof(buf))
buf[n-1] = 0;
else
buf[n] = 0;
if (WIFEXITED(status)) { if (WIFEXITED(status)) {
if (WEXITSTATUS(status)) { if (WEXITSTATUS(status)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment