From owner-freebsd-bugs Sun Oct 29 15:40: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 27E5737B661 for ; Sun, 29 Oct 2000 15:40:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id PAA47227; Sun, 29 Oct 2000 15:40:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id D3D5D37B479; Sun, 29 Oct 2000 15:30:54 -0800 (PST) Message-Id: <20001029233054.D3D5D37B479@hub.freebsd.org> Date: Sun, 29 Oct 2000 15:30:54 -0800 (PST) From: cjuniet@yahoo.com To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/22401: pkg_add -r does a segmentation fault Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 22401 >Category: bin >Synopsis: pkg_add -r does a segmentation fault >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 29 15:40:00 PST 2000 >Closed-Date: >Last-Modified: >Originator: Christophe Juniet >Release: 4.1.1-STABLE i386 >Organization: >Environment: FreeBSD quark.dyndns.org 4.1.1-STABLE FreeBSD 4.1.1-STABLE #0: Sun Oct 29 13:22:35 CET 2000 root@quark.dyndns.org:/usr/src/sys/compile/QUARK i386 >Description: On -STABLE, since revision 1.16.2.10, pkg_add -r does a segmentation fault if it is given any argument. In /usr/src/lib/libfetch/ftp.c, line 890 if (!strchr(flags, 'd') && (purl = _ftp_get_proxy()) != NULL) does a segmentation fault because flags is NULL. >How-To-Repeat: pkg_add -r foo >Fix: In /usr/src/lib/libfetch/ftp.c, lines 890 and 937 and 971 should be if (!(flags && strchr(flags, 'd')) && (purl = _ftp_get_proxy()) != NULL) or it should use CHECK_FLAG as in -CURRENT if (!CHECK_FLAG('d') && (purl = _ftp_get_proxy()) != NULL) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message