Date: Tue, 30 Jan 2001 23:40:03 -0800 (PST) From: Peter Pentchev <roam@orbitel.bg> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/24745: ftp segfault condition Message-ID: <200101310740.f0V7e3M28976@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/24745; it has been noted by GNATS. From: Peter Pentchev <roam@orbitel.bg> To: Alex Kapranoff <kapr@acm.org> Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: bin/24745: ftp segfault condition Date: Wed, 31 Jan 2001 09:25:35 +0200 On Tue, Jan 30, 2001 at 11:00:08PM -0800, Alex Kapranoff wrote: > The following reply was made to PR bin/24745; it has been noted by GNATS. > > From: Alex Kapranoff <kapr@acm.org> > To: jweaver@accountsupport.com > Cc: FreeBSD-gnats-submit@FreeBSD.ORG > Subject: Re: bin/24745: ftp segfault condition > Date: Wed, 31 Jan 2001 09:46:11 +0300 > > On Tue, Jan 30, 2001 at 06:51:53PM -0500, jweaver@accountsupport.com wrote: > > > >Description: > > Following http url commandline makes /usr/bin/ftp Segfault > > > > >How-To-Repeat: > > bash-2.04$ ftp http://www.wfamaps.com/download.php?file=/pub/wfamaps/maps/map-2forts-wfa.zip > > Requesting http://www.wfamaps.com/download.php?file=/pub/wfamaps/maps/map-2forts-wfa.zip > > ftp: Error retrieving file: 404 Not Found > > > > ftp in free(): warning: junk pointer, too high to make sense. > > Segmentation fault (core dumped) > > I confirm the bug under 4.2-STABLE. By the way, it works fine under > -CURRENT, so you can try to backport some -CURRENT diffs. Actually, this is pretty much the only difference between usr.bin/ftp/ in -stable and -current. Try the attached patch, it does the trick for me. G'luck, Peter -- because I didn't think of a good beginning of it. Index: src/usr.bin/ftp/fetch.c =================================================================== RCS file: /home/ncvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.12.2.2 diff -u -r1.12.2.2 fetch.c --- src/usr.bin/ftp/fetch.c 2000/06/24 15:35:46 1.12.2.2 +++ src/usr.bin/ftp/fetch.c 2001/01/31 07:24:16 @@ -270,6 +270,7 @@ break; } freeaddrinfo(res0); + res0 = NULL; /* * Construct and send the request. We're expecting a return 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?200101310740.f0V7e3M28976>