Skip to content

Commit

Permalink
virtfs-proxy-helper: add missing long option terminator
Browse files Browse the repository at this point in the history
The getopt_long(3) long options array must have a zeroed terminator.

This patch solves a segmentation fault when an unknown command-line
option is encountered:

  $ fsdev/virtfs-proxy-helper --help
  Segmentation fault (core dumped)

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
  • Loading branch information
stefanhaRH authored and kvaneesh committed Jun 16, 2015
1 parent 93f6d1c commit bf6667d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fsdev/virtfs-proxy-helper.c
Expand Up @@ -49,6 +49,7 @@ static struct option helper_opts[] = {
{"socket", required_argument, NULL, 's'},
{"uid", required_argument, NULL, 'u'},
{"gid", required_argument, NULL, 'g'},
{},
};

static bool is_daemon;
Expand Down

0 comments on commit bf6667d

Please sign in to comment.