summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--scp.c4
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 595f1f6fc..26afd0929 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
2120030108 2620030108
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 $
diff --git a/scp.c b/scp.c
index 44b5b4582..616dd3783 100644
--- a/scp.c
+++ b/scp.c
@@ -75,7 +75,7 @@
75 */ 75 */
76 76
77#include "includes.h" 77#include "includes.h"
78RCSID("$OpenBSD: scp.c,v 1.97 2003/01/10 08:19:07 fgsch Exp $"); 78RCSID("$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 }