On Tue, Oct 22, 2002 at 03:43:54PM -0400, Robert Hardy wrote:
> FYI "Lftp | Version 2.6.2" currently doesn't handle permissions or non-file
> redirection gracefully. I accidentally did this and lftp dumped core:
> lftp speakeasy.rpmfind.net:/linux/rawhide/1.0/SRPMS/SRPMS> cls --date > /tmp/foo   
> cls: /tmp/foo: Is a directory
> Abort (core dumped)

Oops, sorry about that.  Patch attached.  (Embarrassing.  Anyone have a
paper bag I could borrow?)

Seems there's a memory leak somewhere, too.  I have a feeling that's
also my fault.  I'll see about tracking that down in the next couple days.

-- 
Glenn Maynard
Index: OutputJob.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/OutputJob.cc,v
retrieving revision 1.7
diff -u -r1.7 OutputJob.cc
--- OutputJob.cc        2002/08/29 07:26:20     1.7
+++ OutputJob.cc        2002/10/23 06:49:43
@@ -337,6 +337,9 @@
 
 void OutputJob::PutEOF()
 {
+   if(Error())
+      return;
+
    /* Make sure we've sent at least one (empty) block.  This ensures
     * that we always start the input->output code path. */
    Put("", 0);

Reply via email to