diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2015-03-30 14:57:15 +0100 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2015-06-16 20:32:29 +0530 |
commit | bf6667d63ef4c4fbaf91051589a594ec1c235308 (patch) | |
tree | 04be360e93addfa8001bcca5bfdf04cfafe11ba7 | |
parent | 93f6d1c16036aaf34055d16f54ea770fb8d6d280 (diff) |
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>
-rw-r--r-- | fsdev/virtfs-proxy-helper.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index a698e2dbb3..91e8b9b7f1 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/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; |