Unverified Commit 5acd5cf0 by 2xsec Committed by Christian Brauner

coverity: #1425778

Out-of-bounds write Signed-off-by: 's avatar2xsec <dh48.jeong@samsung.com>
parent 04bed15a
......@@ -1209,7 +1209,11 @@ static bool do_dump(struct lxc_container *c, char *mode, struct migrate_opts *op
SYSERROR("read");
n = 0;
}
buf[n] = 0;
if (n == sizeof(buf))
buf[n-1] = 0;
else
buf[n] = 0;
if (WIFEXITED(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