From: Alexey Gladkov Date: Wed, 5 Jan 2011 18:22:51 +0000 (+0300) Subject: unshare: fix SIGSEGV on invalid command line option X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ffde0b60b7f6452c47bab1c9929583baed32378;p=util-linux 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 --- diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index 6b6177c5..12a725e3 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;