On Sun, 31 May 2009 17:34:05 -0400
Eitan Adler <eitanadlerl...@gmail.com> wrote:
> pkg_info --IwantAcookie
> Segmentation fault: 11 (core dumped)
> on FreeBSD 7.2-STABLE i386

getopt_long expects the array of options to be NULL-terminated, so it's
walking off the end.

-- 
Bruce Cran
--- /usr/src/usr.sbin/pkg_install/info/main.c	2008-06-10 10:55:25.000000000 +0100
+++ main.c	2009-06-01 21:25:37.000000000 +0100
@@ -58,6 +58,7 @@
 	{ "verbose",	no_argument,		NULL,		'v' },
 	{ "version",	no_argument,		NULL,		'P' },
 	{ "which",	required_argument,	NULL,		'W' },
+	{ NULL,		0,			NULL,		0   },
 };
 
 int
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to