Hrvoje Niksic wrote: > > This patch should fix the problem. Please let me know if it works for > you: > > 2004-05-08 Hrvoje Niksic <[EMAIL PROTECTED]> > > * ftp-basic.c (ftp_pwd): Handle PWD response not containing > double quote. > > Index: src/ftp-basic.c > =================================================================== > RCS file: /pack/anoncvs/wget/src/ftp-basic.c,v > retrieving revision 1.23.2.2 > diff -u -r1.23.2.2 ftp-basic.c > --- src/ftp-basic.c 2003/11/16 19:19:03 1.23.2.2 > +++ src/ftp-basic.c 2004/05/08 15:18:15 > @@ -815,6 +815,11 @@ > and everything following it. */ > strtok (respline, "\""); > request = strtok (NULL, "\""); > + if (request == NULL) > + { > + xfree (respline); > + return FTPSRVERR; > + } > > /* Has the `pwd' been already allocated? Free! */ > FREE_MAYBE (*pwd);
I added the five lines to ftp-basic.c and recompiled Wget. Now I can say that your patch is indeed working for me![1] Thank you very much. BTW, I was a little bit confused because of the last line in your patch. Instead of "FREE_MAYBE (*pwd);" my ftp-basic.c contains "xfree_null (*pwd);". I wasn't sure whether I should replace it or not. I didn't replace the line, and everything worked fine. Again, thank you. Wget is a great tool! Regards, Axel Pettinger [1] DEBUG output created by Wget 1.9+cvs-dev on mingw32. --07:22:28-- ftp://anonymous:*password*@<ip>:<port>/up.exe;type=i => `up.exe.1' Connecting to <ip>:<port>... seconds 0.00, connected. Created socket 108. Releasing 00440DD0 (new refcount 0). Deleting unused 00440DD0. Logging in as anonymous ... 220 OK --> USER anonymous 331 OK --> PASS Turtle Power! 230 OK --> SYST 226 OK --> PWD 226 OK --> TYPE I 226 OK ==> CWD not needed. conaddr is: 217.234.180.133 Local socket fd 24 bound. binding to address 217.234.180.133 using port 1550. --> PORT 217,234,180,133,6,14 200 OK --> RETR up.exe 150 OK Accepted client at socket 120. 0K .......... ..... 10.82 KB/s Closed fd 120 Closed fd 24 226 OK Closed fd 108 07:22:31 (10.82 KB/s) - `up.exe.1' saved [15872]