[PATCH] uuidparse: fix getopt crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>

$ ./uuidparse --unknownopt
Segmentation fault (core dumped)

Hehe, this is the first real bug found by 'make checkusage'.

Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>
---
 misc-utils/uuidparse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/misc-utils/uuidparse.c b/misc-utils/uuidparse.c
index 0938b8559..09a6b46a8 100644
--- a/misc-utils/uuidparse.c
+++ b/misc-utils/uuidparse.c
@@ -299,6 +299,7 @@ int main(int argc, char **argv)
 		{"raw",        no_argument,       NULL, 'r'},
 		{"version",    no_argument,       NULL, 'V'},
 		{"help",       no_argument,       NULL, 'h'},
+		{NULL, 0, NULL, 0}
 	};
 	static const ul_excl_t excl[] = {
 		{'J', 'r'},
-- 
2.12.3

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux