Hi,

Under certain circumstances, lftp segfaults when using tab completion.

To observe the bug:
1/ log into a ftp server
2/ warm the cache => 'ls' is ok
3/ wait a few minutes (this is most likely depending on your client &
server configurations...)
4/ type for instance 'du -sh '+ <tab>
5/ (sometimes - probably depending on the time step 3 lasted) it segfaults

The attached small patch against version 3.0.12 (packaged by Debian,
should that matter) seems to workaround the issue.

Feel free to contact me if further information is needed.

-- 
Pierre Lombard <[EMAIL PROTECTED]>
(please CC: me as I am not a lftp-list subscriber).
--- lftp-3.0.12/src/ftpclass.cc~        2004-12-17 23:47:46.000000000 +0100
+++ lftp-3.0.12/src/ftpclass.cc 2004-12-17 23:48:53.000000000 +0100
@@ -1091,8 +1091,10 @@
 
 void  Ftp::HandleTimeout()
 {
-   conn->quit_sent=true;
+   if(conn)
+   {
+     conn->quit_sent=true;
+   }
    super::HandleTimeout();
 }
 

Reply via email to