[progressmeter.c]
     do write to buf[-1]
This commit is contained in:
Damien Miller 2003-09-02 22:53:32 +10:00
parent 17af176302
commit b5829f56eb
2 changed files with 7 additions and 2 deletions

View File

@ -19,6 +19,9 @@
[progressmeter.c]
pass file_size + 1 to snprintf: fixes printing of truncated
file names; fix based on patch/report from sturm@;
- markus@cvs.openbsd.org 2003/08/31 12:14:22
[progressmeter.c]
do write to buf[-1]
20030829
- (bal) openbsd-compat/ clean up. Considate headers, add in Id on our
@ -934,4 +937,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.2924 2003/09/02 12:53:01 djm Exp $
$Id: ChangeLog,v 1.2925 2003/09/02 12:53:32 djm Exp $

View File

@ -23,7 +23,7 @@
*/
#include "includes.h"
RCSID("$OpenBSD: progressmeter.c,v 1.14 2003/08/31 10:26:04 markus Exp $");
RCSID("$OpenBSD: progressmeter.c,v 1.15 2003/08/31 12:14:22 markus Exp $");
#include "progressmeter.h"
#include "atomicio.h"
@ -141,6 +141,8 @@ refresh_progress_meter(void)
file_len = win_size - 35;
if (file_len > 0) {
len = snprintf(buf, file_len + 1, "\r%s", file);
if (len < 0)
len = 0;
for (i = len; i < file_len; i++ )
buf[i] = ' ';
buf[file_len] = '\0';