diff options
author | Anders F Björklund <anders.f.bjorklund@gmail.com> | 2018-08-02 19:13:11 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-03 07:39:25 +0000 |
commit | 71af51e723711359dfd7e091fd7b5f7e392e61bf (patch) | |
tree | b0871579ef9d41206939f6659ed0de80c5e4502b | |
parent | 26b9b17d275d3b740a471e70cc8116f75de99a3d (diff) | |
download | podman-71af51e723711359dfd7e091fd7b5f7e392e61bf.tar.gz podman-71af51e723711359dfd7e091fd7b5f7e392e61bf.tar.bz2 podman-71af51e723711359dfd7e091fd7b5f7e392e61bf.zip |
Check for missing arguments in /proc/self/cmdline
Closes: #1206
Approved by: giuseppe
-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) |