Bug 709

Summary: refresh_progress_meter() appends null bytes
Product: Portable OpenSSH Reporter: Robert Dahlem <Robert.Dahlem>
Component: scpAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: minor    
Priority: P4    
Version: -current   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed patch none

Description Robert Dahlem 2003-09-24 02:41:47 AEST
Since 3.7.1p1 refresh_progress_meter() appends a null byte every time the
progress meter is updated. 

This is quite disturbing on terminals which skip to the next line when a null
byte is written to the last column.

It is an off-by-one-bug: win_size is the string length including terminating
null byte, so atomicio() must not write more than win_size-1 bytes to stdout.
Perhaps strlen(buf) would be better than win_size-1 ...
Comment 1 Robert Dahlem 2003-09-24 02:42:32 AEST
Created attachment 461 [details]
proposed patch
Comment 2 Markus Friedl 2003-09-24 06:40:01 AEST
thanks, applied.
Comment 3 Damien Miller 2004-04-14 12:24:19 AEST
Mass change of RESOLVED bugs to CLOSED