Hrvoje Niksic wrote: > > I think I understand where the bug is. The server doesn't seem to > send PWD in the format the code expects (in fact, it doesn't seem to > be sending it at all).
So one could indeed say that it is a strange ftp server, and not only a bug in the wget code ... > Specifically, this code in ftp-basic.c looks like the culprit: > > strtok (respline, "\""); > request = strtok (NULL, "\""); > ... > *pwd = xstrdup (request); > > If the request doesn't contain a quote, this will in effect invoke > xstrdup (NULL), which results in calling strdup (NULL), which returns > null and makes xstrdup think that strdup signalled "not enough > memory". > > This patch should fix the problem. Please let me know if it works for > you: I would like to check it out, but I'm afraid I'm not able to compile it. Regards, Axel Pettinger