Date: Sun, 29 Oct 2000 15:30:54 -0800 (PST) From: cjuniet@yahoo.com To: freebsd-gnats-submit@FreeBSD.org Subject: bin/22401: pkg_add -r does a segmentation fault Message-ID: <20001029233054.D3D5D37B479@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001029233054.D3D5D37B479>
