Date: Fri, 9 Aug 2002 20:10:04 -0700 (PDT) From: Brad Johnson <bjohnson@got.wedgie.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/41482: pkg_info core-dumps for old style +CONTENTS file Message-ID: <200208100310.g7A3A4Sj036079@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/41482; it has been noted by GNATS. From: Brad Johnson <bjohnson@got.wedgie.org> To: freebsd-gnats-submit@FreeBSD.org Cc: iwaki@bc.niigata-u.ac.jp Subject: Re: bin/41482: pkg_info core-dumps for old style +CONTENTS file Date: Fri, 9 Aug 2002 23:12:43 -0400 (EDT) Actually... I noticed this too and decided to do a little digging... A new "origin" char* member of the Package structure was recently added on 8/2/2002, presumably to assist in adding the "search for packages by origin" feature. However, this origin char* never gets initialized... so if your package/port is old style and doesn't have an origin, your pkg_info -o will seg fault. I added: p->origin = NULL; near the beginning of the add_plist function in lib/plist.c (which starts at line 32), recompiled, and everything started working again. Not sure if that's the best place for the initialization to go, but since that seems to be the only function that ever writes to the origin variable, it seems as good as any. Hope that helps! Brad Johnson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208100310.g7A3A4Sj036079>