scp: missing progressbar, better behaviour on small windows

Ben Lindstrom mouring at
Wed May 7 07:22:17 EST 2003

Why would we use 'sprintf'?  We have been careful to keep that insecure
garbage out of our code.

- Ben

On Tue, 6 May 2003, [iso-8859-1] "Uwe Räsch" wrote:

> I miss the stars when doing scp. My suggestion for progressmeter.c makes scp to
> display different fields on different terminal widths. Maybe this is useful for
> you.
> Once in "start_progress_meter()" the outlook of the progressline is calculated.
> In "draw_progress_meter()" sprintf() instead of snprintf() together with some
> strlen()'s can be used, because the buffersize has been respected before. The
> remaining time can now have the form "> 99 days", "11d12:44" or as before
> "22:33:44" and "   33:44".
> Okay, with 80 columns the filename is displayed with only 24 characters instead
> of the 45 in the original code after 2002/12/13, but using 121 columns should
> not be a problem today.
> (See attached file: progressmeter.c)
> --
> Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
> Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
> sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
> dieser E-Mail oder die unbefugte Weitergabe der enthaltenenen Informationen
> ist nicht gestattet.
> The information contained in this message is confidential or protected by
> law. If you are not the intended recipient, please contact the sender and
> delete this message. Any unauthorised copying of this message or
> unauthorised distribution of the information contained herein is prohibited.

More information about the openssh-unix-dev mailing list