Re: lftp-3.5.5 new bug found: mget -c: Segmentation fault

"Alexander V. Lukyanov" <[email protected]> Mon, 9 Oct 2006 21:08:01 +0400
Newsgroups gmane.network.lftp.devel,gmane.network.lftp.user
Message-ID <[email protected]>
On Sat, Oct 07, 2006 at 06:29:52AM -0400, Justin Piszcz wrote:
> #1  0x08065449 in GetJob::Do (this=0x8360800) at GetJob.cc:47

Please test this patch.

--
   Alexander.
diff (text/plain, 567 B)
Index: CopyJob.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/CopyJob.cc,v
retrieving revision 1.34
diff -u -p -r1.34 CopyJob.cc
--- CopyJob.cc	27 Sep 2006 07:24:04 -0000	1.34
+++ CopyJob.cc	9 Oct 2006 11:56:08 -0000
@@ -244,6 +244,10 @@ int CopyJobEnv::Do()
    bytes+=j->GetBytesCount();
    time_spent+=j->GetTimeSpent();
    Delete(j);
+   if(cp==j)
+      cp=0;
+   if(waiting_num>0 && cp==0)
+      cp=(CopyJob*)waiting[0];
    return MOVED;
 }
 void CopyJobEnv::AddCopier(FileCopy *c,const char *n)