| Summary: | ftp(1) has stack overflow when "mget *", etc. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | SASAKI Taroh <taroh> | ||||
| Component: | bin | Assignee: | Mike Heffner <mikeh> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
SASAKI Taroh
2001-07-15 17:00:01 UTC
On Sun, Jul 15, 2001 at 08:59:28AM -0700, SASAKI Taroh wrote: > > >Fix: > *** usr/src/usr.bin/ftp/util.c Mon Jul 16 00:45:11 2001 > --- usr/src/usr.bin/ftp/util.c.org Mon Jul 16 00:37:57 2001 > *************** > *** 371,377 **** > hash = 0; > if (doswitch) > pswitch(!proxy); > ! for (mode = "w", ++argv; *argv != NULL; argv++, mode = "a") I don't seem to be able to locate this piece of code in util.c. According to cvsweb, the 'fix' has been in the tree since rev 1.1. > recvrequest("NLST", temp, *argv, mode, 0, 0); > if ((code / 100) != COMPLETE) { > if (errbuf != NULL) > --- 371,377 ---- > hash = 0; > if (doswitch) > pswitch(!proxy); > ! for (mode = "w"; *++argv != NULL; mode = "a") > recvrequest("NLST", temp, *argv, mode, 0, 0); > if ((code / 100) != COMPLETE) { > if (errbuf != NULL) > -- Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org -------------------------------------------------------- FreeBSD: The Power To Serve - http://www.FreeBSD.org hi, At Sun, 15 Jul 2001 13:23:58 -0400, Chris Faulhaber <jedgar@fxp.org> wrote: > > ! for (mode = "w", ++argv; *argv != NULL; argv++, mode = "a") (snip) > > ! for (mode = "w"; *++argv != NULL; mode = "a") > I don't seem to be able to locate this piece of code in util.c. > According to cvsweb, the 'fix' has been in the tree since rev 1.1. sorry, my mistake. that's because the diff arguments are in reverse order (diff NEW OLD): > > *** usr/src/usr.bin/ftp/util.c Mon Jul 16 00:45:11 2001 > > --- usr/src/usr.bin/ftp/util.c.org Mon Jul 16 00:37:57 2001 thanks, * Please don't attach any application dependent (e.g. MS-Excel or Word) file. I'll NEVER open it for the sake of protecting the network. --- SASAKI, Taroh | When you go on this road, never be anxious.| mailto:taroh@taroh.org| If you fear, there's no road.| http://www.taroh.org/ | ??? If you step, that'll be a road.| phone://81/908/50/76728 % Go, don't be hesitate. You will know.| icq:19785633 | ********** *** --- Ikkyu, the Bonze | address:jp/221/0005/4/541/1/203A **** ----------------------------+ global:/wgs84/n35/30/06.9/e139/38/14.6/h29 pgpfingerprint:4C/6A/E6/0E/D5/A1/DA/AC/54/8F/94/E9/E3/F2/9C/08 On 15-Jul-2001 SASAKI Taroh wrote:
|
|>Fix:
| *** usr/src/usr.bin/ftp/util.c Mon Jul 16 00:45:11 2001
| --- usr/src/usr.bin/ftp/util.c.org Mon Jul 16 00:37:57 2001
| ***************
| *** 371,377 ****
| hash = 0;
| if (doswitch)
| pswitch(!proxy);
| ! for (mode = "w", ++argv; *argv != NULL; argv++, mode = "a")
| recvrequest("NLST", temp, *argv, mode, 0, 0);
| if ((code / 100) != COMPLETE) {
| if (errbuf != NULL)
| --- 371,377 ----
| hash = 0;
| if (doswitch)
| pswitch(!proxy);
| ! for (mode = "w"; *++argv != NULL; mode = "a")
| recvrequest("NLST", temp, *argv, mode, 0, 0);
| if ((code / 100) != COMPLETE) {
| if (errbuf != NULL)
Now that I look at this more, this change is nil, there is no change in
behavior. What exactly is the 'illegal stack access' that your program is
detecting and where is it occuring?
Mike
--
Mike Heffner <mheffner@[acm.]vt.edu>
Fredericksburg, VA <mikeh@FreeBSD.org>
State Changed From-To: open->feedback Waiting for reply from originator. Responsible Changed From-To: freebsd-bugs->mikeh I'll take this. State Changed From-To: feedback->closed Feedback timeout. |