Date: Mon, 1 Jun 2009 21:28:19 +0100 From: Bruce Cran <bruce@cran.org.uk> To: Eitan Adler <eitanadlerlist@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: pkg_info segfault Revision: 193189 Message-ID: <20090601212819.7fa6598e@gluon.draftnet> In-Reply-To: <4A22F7CD.2070500@gmail.com> References: <4A22F7CD.2070500@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--MP_/BgQzk8W+yfZojiEAKH8FaXk
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Sun, 31 May 2009 17:34:05 -0400
Eitan Adler <eitanadlerlist@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
--MP_/BgQzk8W+yfZojiEAKH8FaXk
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=main.c.diff
--- /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
--MP_/BgQzk8W+yfZojiEAKH8FaXk--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090601212819.7fa6598e>
