Browse Source

virtfs-proxy-helper: add missing long option terminator

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>
pull/28/head
Stefan Hajnoczi 12 years ago
committed by Aneesh Kumar K.V
parent
commit
bf6667d63e
  1. 1
      fsdev/virtfs-proxy-helper.c

1
fsdev/virtfs-proxy-helper.c

@ -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;

Loading…
Cancel
Save