[BUG] lftp 4.3.6

Achim Gratz Stromeko@nexgo.de
Tue May 29 19:03:00 GMT 2012

There is an insidious bug that affects at least lftp on the latest
cygwin snapshot as well as the 1.7.15 release.  Prepare and run an lftp
script like this:

perl -e 'foreach (1..100){' \
     -e 'print "ls -r file:/", ' \
     -e '(map {"$_"x10. "/"}(a..z)), "\n"}' \
     > test.lftp
lftp -f test.lftp |& grep -v ls:

Observe that lftp splits the commands at a 4kiB boundary (a read
buffer?) and gives an error on the part over in the next buffer as if
the buffer boundary had been an EOL (which also means that it tried to
execute the incomplete command).

Now, the script I've shown above is harmless and in fact doesn't do
anything.  I haven't been so lucky, in my case the script got cut
exactly after an

rm -r /cygdrive/c

In the past I've cursed the disk in my computer at work for being so
slow, but today I was glad that it wasn't zippy.  Still, the rest of the
day I've had to clean up the damage.

Under Linux i can't get lftp 4.3.3 to misbehave in the same manner even
with much larger command lines and files, so it is either something
introduced with a newer version of lftp or unique to lftp on Cygwin.

+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:

Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list