On Tue, Aug 07, 2001 at 04:43:39PM +0400, Alexander V. Lukyanov wrote:
> See the patch. I'll release 2.4.1 soon.
--
Alexander.
Index: ftpclass.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/ftpclass.cc,v
retrieving revision 1.196
diff -u -r1.196 ftpclass.cc
--- ftpclass.cc 2001/07/25 09:03:28 1.196
+++ ftpclass.cc 2001/08/07 12:42:47
@@ -2023,8 +2023,9 @@
}
const char *Ftp::QueryStringWithUserAtHost(const char *var)
{
- char *closure=string_alloca(xstrlen(user)+1+xstrlen(hostname)+1);
- sprintf(closure,"%s@%s",user?user:"anonymous",hostname);
+ const char *u=user?user:"anonymous";
+ char *closure=string_alloca(strlen(u)+1+xstrlen(hostname)+1);
+ sprintf(closure,"%s@%s",u,hostname);
const char *val=Query(var,closure);
if(!val || !val[0])
val=Query(var,hostname);