diff options
author | Alexey Gladkov | 2011-01-05 19:22:51 +0100 |
---|---|---|
committer | Karel Zak | 2011-01-05 20:30:16 +0100 |
commit | 4ffde0b60b7f6452c47bab1c9929583baed32378 (patch) | |
tree | 4808554c2b79f6414b218b2fb4fe63d0d92b0bdc /sys-utils/unshare.c | |
parent | fdisk: re-print prompt after maybe_exit() (diff) | |
download | kernel-qcow2-util-linux-4ffde0b60b7f6452c47bab1c9929583baed32378.tar.gz kernel-qcow2-util-linux-4ffde0b60b7f6452c47bab1c9929583baed32378.tar.xz kernel-qcow2-util-linux-4ffde0b60b7f6452c47bab1c9929583baed32378.zip |
unshare: fix SIGSEGV on invalid command line option
$ unshare --hel
Segmentation fault
The last element of longopts has to be filled with zeros.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Diffstat (limited to 'sys-utils/unshare.c')
-rw-r--r-- | sys-utils/unshare.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index 6b6177c54..12a725e3b 100644 --- a/sys-utils/unshare.c +++ b/sys-utils/unshare.c @@ -76,6 +76,7 @@ int main(int argc, char *argv[]) { "uts", no_argument, 0, 'u' }, { "ipc", no_argument, 0, 'i' }, { "net", no_argument, 0, 'n' }, + { NULL, 0, 0, 0 } }; int unshare_flags = 0; |