Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Mar 2001 19:02:54 +0900
From:      "Akinori MUSHA" <knu@iDaemons.org>
To:        sobomax@FreeBSD.org
Cc:        ports@FreeBSD.org
Subject:   pkg_info coredumps when doing "make deinstall"
Message-ID:  <86lmqp6c35.wl@archon.local.idaemons.org>

next in thread | raw e-mail | index | archive | help
Hi,

Pkg_info coredumps when doing "make deinstall", and I found a
suspicious piece of code in src/usr.sbin/pkg_install/info/perform.c,
rev.1.35:

	int
	pkg_perform(char **pkgs)
	{
	    char **matched;
	    char *tmp;
	    int err_cnt = 0;
	    int i, errcode;
	
	    signal(SIGINT, cleanup);
	
	    /* Overriding action? */
	    if (CheckPkg) {
		char buf[FILENAME_MAX];
	
		snprintf(buf, FILENAME_MAX, "%s/%s", tmp, CheckPkg);
		return abs(access(buf, R_OK));
		/* Not reached */
	    }

As you can see, tmp is never initialized before it's referred to...
And I suppose you should restore the lines you removed in rev.1.35:

	    tmp = getenv(PKG_DBDIR);
	    if (!tmp)
	       tmp = DEF_LOG_DIR;

cf.
	http://www.FreeBSD.org/cgi/cvsweb.cgi/src/usr.sbin/pkg_install/info/perform.c.diff?r1=1.34&r2=1.35

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"We're only at home when we're on the run, on the wing, on the fly"

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86lmqp6c35.wl>