diff options
Diffstat (limited to 'pkg/rootless')
-rw-r--r-- | pkg/rootless/rootless_linux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c index 84fac238f..1b98f76eb 100644 --- a/pkg/rootless/rootless_linux.c +++ b/pkg/rootless/rootless_linux.c @@ -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) |