From 4ffde0b60b7f6452c47bab1c9929583baed32378 Mon Sep 17 00:00:00 2001 From: Alexey Gladkov Date: Wed, 5 Jan 2011 21:22:51 +0300 Subject: [PATCH] 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 --- sys-utils/unshare.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.39.5