diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | scp.c | 4 |
2 files changed, 8 insertions, 3 deletions
@@ -17,6 +17,11 @@ | |||
17 | [sftp-client.c] | 17 | [sftp-client.c] |
18 | Simplify and avoid redundancy in packet send and receive | 18 | Simplify and avoid redundancy in packet send and receive |
19 | functions; ok fgs@ | 19 | functions; ok fgs@ |
20 | - djm@cvs.openbsd.org 2003/01/10 10:29:35 | ||
21 | [scp.c] | ||
22 | Don't ftruncate after write error, creating sparse files of | ||
23 | incorrect length | ||
24 | mindrot bug #403, reported by rusr@cup.hp.com; ok markus@ | ||
20 | 25 | ||
21 | 20030108 | 26 | 20030108 |
22 | - (djm) Sync openbsd-compat/ with OpenBSD -current | 27 | - (djm) Sync openbsd-compat/ with OpenBSD -current |
@@ -985,4 +990,4 @@ | |||
985 | save auth method before monitor_reset_key_state(); bugzilla bug #284; | 990 | save auth method before monitor_reset_key_state(); bugzilla bug #284; |
986 | ok provos@ | 991 | ok provos@ |
987 | 992 | ||
988 | $Id: ChangeLog,v 1.2561 2003/01/10 10:43:58 djm Exp $ | 993 | $Id: ChangeLog,v 1.2562 2003/01/10 10:44:48 djm Exp $ |
@@ -75,7 +75,7 @@ | |||
75 | */ | 75 | */ |
76 | 76 | ||
77 | #include "includes.h" | 77 | #include "includes.h" |
78 | RCSID("$OpenBSD: scp.c,v 1.97 2003/01/10 08:19:07 fgsch Exp $"); | 78 | RCSID("$OpenBSD: scp.c,v 1.98 2003/01/10 10:29:35 djm Exp $"); |
79 | 79 | ||
80 | #include "xmalloc.h" | 80 | #include "xmalloc.h" |
81 | #include "atomicio.h" | 81 | #include "atomicio.h" |
@@ -864,7 +864,7 @@ bad: run_err("%s: %s", np, strerror(errno)); | |||
864 | wrerr = YES; | 864 | wrerr = YES; |
865 | wrerrno = j >= 0 ? EIO : errno; | 865 | wrerrno = j >= 0 ? EIO : errno; |
866 | } | 866 | } |
867 | if (ftruncate(ofd, size)) { | 867 | if (wrerr == NO && ftruncate(ofd, size) != 0) { |
868 | run_err("%s: truncate: %s", np, strerror(errno)); | 868 | run_err("%s: truncate: %s", np, strerror(errno)); |
869 | wrerr = DISPLAYED; | 869 | wrerr = DISPLAYED; |
870 | } | 870 | } |