diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2019-01-23 08:01:46 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2019-01-24 12:30:30 +1100 |
commit | 8976f1c4b2721c26e878151f52bdf346dfe2d54c (patch) | |
tree | 528e309cbe5944c0127a1c3fa0752fe2f9701232 /scp.c | |
parent | 6249451f381755f792c6b9e2c2f80cdc699c14e2 (diff) |
upstream: Sanitize scp filenames via snmprintf. To do this we move
the progressmeter formatting outside of signal handler context and have the
atomicio callback called for EINTR too. bz#2434 with contributions from djm
and jjelen at redhat.com, ok djm@
OpenBSD-Commit-ID: 1af61c1f70e4f3bd8ab140b9f1fa699481db57d8
Diffstat (limited to 'scp.c')
-rw-r--r-- | scp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: scp.c,v 1.199 2019/01/21 22:50:42 tb Exp $ */ | 1 | /* $OpenBSD: scp.c,v 1.200 2019/01/23 08:01:46 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * scp - secure remote copy. This is basically patched BSD rcp which | 3 | * scp - secure remote copy. This is basically patched BSD rcp which |
4 | * uses ssh to do the data transfer (instead of using rcmd). | 4 | * uses ssh to do the data transfer (instead of using rcmd). |
@@ -588,6 +588,7 @@ scpio(void *_cnt, size_t s) | |||
588 | off_t *cnt = (off_t *)_cnt; | 588 | off_t *cnt = (off_t *)_cnt; |
589 | 589 | ||
590 | *cnt += s; | 590 | *cnt += s; |
591 | refresh_progress_meter(); | ||
591 | if (limit_kbps > 0) | 592 | if (limit_kbps > 0) |
592 | bandwidth_limit(&bwlimit, s); | 593 | bandwidth_limit(&bwlimit, s); |
593 | return 0; | 594 | return 0; |