From owner-freebsd-current Sat Oct 12 15:51:18 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57BF537B401 for ; Sat, 12 Oct 2002 15:51:17 -0700 (PDT) Received: from obsecurity.dyndns.org (adsl-64-165-226-88.dsl.lsan03.pacbell.net [64.165.226.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81B7243EAF for ; Sat, 12 Oct 2002 15:51:16 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id DEB1366B5E; Sat, 12 Oct 2002 15:51:15 -0700 (PDT) Date: Sat, 12 Oct 2002 15:51:15 -0700 From: Kris Kennaway To: jwe@che.utexas.edu Cc: current@FreeBSD.org Subject: man dumps core if no manpath.config directories exist Message-ID: <20021012225115.GA96279@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline #0 0x0804c7fb in get_manpath (perrs=0, path=0x800
) at /usr/src/gnu/usr.bin/man/manpath/manpath.c:500 #1 0x0804bf30 in manpath (perrs=0) at /usr/src/gnu/usr.bin/man/manpath/manpath.c:195 #2 0x08049a2b in man_getopt (argc=0, argv=0x0) at /usr/src/gnu/usr.bin/man/man/man.c:479 #3 0x080491fe in main (argc=1, argv=0xbfbff78c) at /usr/src/gnu/usr.bin/man/man/man.c:153 #4 0x080490dc in _start (ap=0xbfbff888 "man") at /usr/src/lib/csu/i386-elf/crt1.c:126 (gdb) frame 0 #0 0x0804c7fb in get_manpath (perrs=0, path=0x800
) at /usr/src/gnu/usr.bin/man/manpath/manpath.c:500 500 *manpathlist = '\0'; (gdb) print len $1 = 0 It's pretty clear what's going on..none of the directories in /etc/manpath.config exist, so len=0, so malloc(0) "succeeds" and does nothing, leaving manpathlist a null pointer. This situation can occur if e.g. you install the 'base' freebsd distribution into a jail, without installing any of the manpages. In this situation none of the manpage directories are created either. Kris --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9qKdjWry0BWjoQKURAi40AKCkn9o4jqJTKja+8apO/pjTd1/BawCgvA/b HyAKBdiT/5aU/BNxuykK2fI= =hjEe -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message