From owner-freebsd-qa Fri Mar 30 4:36:16 2001 Delivered-To: freebsd-qa@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id 5229237B722 for ; Fri, 30 Mar 2001 04:36:07 -0800 (PST) (envelope-from roam@orbitel.bg) Received: (qmail 34374 invoked by uid 1000); 30 Mar 2001 12:35:03 -0000 Date: Fri, 30 Mar 2001 15:35:03 +0300 From: Peter Pentchev To: freebsd-qa@FreeBSD.org Cc: freebsd-audit@FreeBSD.org Subject: [Fwd: Re: bin/25243: ftp crashes in remotemodtime ().] Message-ID: <20010330153503.B33524@ringworld.oblivion.bg> Mail-Followup-To: freebsd-qa@FreeBSD.org, freebsd-audit@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-qa@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Uhm. I think this should be fixed in time for 4.3 :) G'luck, Peter -- This sentence contains exactly threee erors. ----- Forwarded message from Peter Pentchev ----- Date: Tue, 20 Feb 2001 23:00:04 -0800 (PST) To: freebsd-bugs@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: bin/25243: ftp crashes in remotemodtime (). Reply-To: Peter Pentchev The following reply was made to PR bin/25243; it has been noted by GNATS. From: Peter Pentchev To: fumis@bigfoot.com Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: bin/25243: ftp crashes in remotemodtime (). Date: Wed, 21 Feb 2001 08:55:45 +0200 On Tue, Feb 20, 2001 at 09:35:01PM -0800, fumis@bigfoot.com wrote: > > >Number: 25243 > >Category: bin > >Synopsis: ftp crashes in remotemodtime (). > >Originator: SHIMIZU Fumiyuki > >Release: 4.2-STABLE > >Organization: > >Environment: > FreeBSD ***snip*** 4.2-STABLE FreeBSD 4.2-STABLE #1: Tue Feb 20 14:01:10 JST 2001 ***snip*** > >Description: > /usr/bin/ftp crashes after getting a file. > > ftp> get foobar > local: foobar remote: foobar > 227 Entering Passive Mode (***snip***) > 150 Opening data connection for foobar (696075740 bytes). > 100% |**************************************************| 663 MB 00:00 ETA > 226 Transfer complete. > 696075740 bytes received in 11999.42 seconds (56.65 KB/s) > Segmentation fault - core dumped > > >How-To-Repeat: > Connect to ftpd which answers with less than 14 or more than 15 characters against `MDTM' request, and get some files. > > >Fix: > Braces required just after `if (fmt != NULL)' in remotemodtime (). > /usr/src/usr.bin/ftp/util.c, line 533 And the patch itself (trivial, yet needed indeed).. G'luck, Peter -- "yields falsehood, when appended to its quotation." yields falsehood, when appended to its quotation. Index: src/usr.bin/ftp/util.c =================================================================== RCS file: /home/ncvs/src/usr.bin/ftp/util.c,v retrieving revision 1.13 diff -u -r1.13 util.c --- src/usr.bin/ftp/util.c 2000/05/22 17:18:38 1.13 +++ src/usr.bin/ftp/util.c 2001/02/21 06:52:52 @@ -529,7 +529,7 @@ y2kbug = 1; } else if (len == 14) fmt = "%04d%02d%02d%02d%02d%02d"; - if (fmt != NULL) + if (fmt != NULL) { memset(&timebuf, 0, sizeof(timebuf)); if (sscanf(mtbuf, fmt, &year, &month, &timebuf.tm_mday, &timebuf.tm_hour, @@ -542,6 +542,7 @@ timebuf.tm_year = year - 1900; rtime = mktime(&timebuf); } + } } if (rtime == -1 && (noisy || debug != 0)) printf("Can't convert %s to a time.\n", mtbuf); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message ----- End forwarded message ----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-qa" in the body of the message