[prev in list] [next in list] [prev in thread] [next in thread]
List: openssh-bugs
Subject: [Bug 2434] scp can send arbitrary control characters / escape sequences to the terminal
From: bugzilla-daemon () bugzilla ! mindrot ! org
Date: 2017-06-30 4:08:42
Message-ID: bug-2434-705-DnYDYxJfcE () https ! bugzilla ! mindrot ! org/
[Download RAW message or body]
https://bugzilla.mindrot.org/show_bug.cgi?id=2434
--- Comment #21 from Damien Miller <djm@mindrot.org> ---
Comment on attachment 2942
--> https://bugzilla.mindrot.org/attachment.cgi?id=2942
Simplify population of file name display
>This keeps the padded and/or truncated displayname in its own variable
>which will allow later use of non-signal-safe functions like snmprintf
>to compose it.
...
>- snprintf(buf + strlen(buf), win_size - strlen(buf),
>- " %3d%% ", percent);
>+ snprintf(buf, sizeof(buf), "\r%s %3d%% ", displayname, percent);
AFAIK it's not safe to truncate arbitrary strings using char* (as
opposed to wchar_t*) functions when the charset is not US-ASCII or
UTF-8. Could you do the truncation using snmprintf() instead?
--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic