On Wed, Oct 24, 2007 at 12:42:13PM +0200, Andreas M. Kirchwitz wrote:
> The brandnew lftp 3.6.0 seems to hang on certain ftp servers
> if debug is set to 3 or higher. While it hangs, it uses up all

It looks like a bug (?) in glibc sprintf function (%.*s format) with
an invalid character sequence. As a workaround, use this setting in lftp:

        set ftp:charset iso8859-1

The setting would also display umlauts correctly on your utf-8 terminal.

Or apply this patch from attachment.

-- 
   Alexander.
Index: FileAccess.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/FileAccess.cc,v
retrieving revision 1.150
diff -u -p -r1.150 FileAccess.cc
--- FileAccess.cc       24 Oct 2007 14:38:49 -0000      1.150
+++ FileAccess.cc       31 Oct 2007 20:51:47 -0000
@@ -104,14 +104,14 @@ FileAccess::~FileAccess()
    ListDel(FileAccess,chain,this,next);
 }
 
-void  FileAccess::Log2(int level,const char *str)
+void  FileAccess::Log2(int level,const char *str0)
 {
-   int len=strlen(str);
-   if(len>0 && str[len-1]=='\n')
-      len--;
-   if(len>0 && str[len-1]=='\r')
-      len--;
-   Log::global->Format(level,"%.*s\n",len,str);
+   xstring &str=xstring::get_tmp();
+   str.set(str0);
+   str.chomp('\n');
+   str.chomp('\r');
+   str.append('\n');
+   Log::global->Write(level,str);
 }
 void  FileAccess::Log3(int level,const char *prefix,const char *str)
 {

Reply via email to