Bug 709 - refresh_progress_meter() appends null bytes
Summary: refresh_progress_meter() appends null bytes
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: scp (show other bugs)
Version: -current
Hardware: All All
: P4 minor
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-24 02:41 AEST by Robert Dahlem
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments
proposed patch (339 bytes, patch)
2003-09-24 02:42 AEST, Robert Dahlem
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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