Skip to content

Commit

Permalink
Check for missing arguments in /proc/self/cmdline
Browse files Browse the repository at this point in the history
  • Loading branch information
afbjorklund committed Aug 2, 2018
1 parent 126a97a commit 054d9bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/rootless/rootless_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ get_cmd_line_args (pid_t pid)
for (i = 0; i < used; i++)
if (buffer[i] == '\0')
argc++;
if (argc == 0)
return NULL;

argv = malloc (sizeof (char *) * (argc + 1));
if (argv == NULL)
Expand Down

0 comments on commit 054d9bc

Please sign in to comment.