X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Achim Gratz Subject: [BUG] lftp 4.3.6 Date: Tue, 29 May 2012 20:56:28 +0200 Lines: 37 Message-ID: <87obp6u883.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves -- 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