Unverified Commit 4819db24 by 2xsec Committed by Christian Brauner

coverity: #1438067

Explicit null dereferenced Signed-off-by: 's avatar2xsec <dh48.jeong@samsung.com>
parent 03df81a4
......@@ -534,6 +534,9 @@ static char *lxc_attach_getpwshell(uid_t uid)
if (found)
continue;
if (!line)
continue;
/* Trim line on the right hand side. */
for (i = strlen(line); i > 0 && (line[i - 1] == '\n' || line[i - 1] == '\r'); --i)
line[i - 1] = '\0';
......
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