Bugzilla – Attachment 2678 Details for
Bug 2434
scp can send arbitrary control characters / escape sequences to the terminal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
similar fix as escaping banner message
file_2434.txt (text/plain), 987 bytes, created by
Jakub Jelen
on 2015-07-28 01:47:08 AEST
(
hide
)
Description:
similar fix as escaping banner message
Filename:
MIME Type:
Creator:
Jakub Jelen
Created:
2015-07-28 01:47:08 AEST
Size:
987 bytes
patch
obsolete
>diff --git a/progressmeter.c b/progressmeter.c >index 319b747..112fe87 100644 >--- a/progressmeter.c >+++ b/progressmeter.c >@@ -66,6 +66,7 @@ static void update_progress_meter(int); > static time_t start; /* start progress */ > static time_t last_update; /* last progress update */ > static const char *file; /* name of the file being transferred */ >+static size_t file_len = 0; /* allocated length of file */ > static off_t start_pos; /* initial position of transfer */ > static off_t end_pos; /* ending position of transfer */ > static off_t cur_pos; /* transfer position as of last refresh */ >@@ -251,7 +252,11 @@ void > start_progress_meter(const char *f, off_t filesize, off_t *ctr) > { > start = last_update = monotime(); >- file = f; >+ if (strlen(f) > file_len) { >+ file_len = strlen(f); >+ file = realloc(file, file_len * 4 + 1); >+ } >+ strnvis(file, f, file_len * 4 + 1, VIS_SAFE|VIS_OCTAL|VIS_NOSLASH); > start_pos = *ctr; > end_pos = filesize; > cur_pos = 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2434
:
2678
|
2858
|
2942
|
2943
|
3228