summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--scp.c8
2 files changed, 8 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index dcddd6c86..3fd15bc1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,6 +44,10 @@
44 [session.c] 44 [session.c]
45 remove xauth entries before add; PR 2994 from janjaap@stack.nl. 45 remove xauth entries before add; PR 2994 from janjaap@stack.nl.
46 ok markus@ 46 ok markus@
47 - markus@cvs.openbsd.org 2002/12/05 11:08:35
48 [scp.c]
49 use roundup() similar to rcp/util.c and avoid problems with strange
50 filesystem block sizes, noted by tjr@freebsd.org; ok djm@
47 51
4820021205 5220021205
49 - (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org 53 - (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
@@ -879,4 +883,4 @@
879 save auth method before monitor_reset_key_state(); bugzilla bug #284; 883 save auth method before monitor_reset_key_state(); bugzilla bug #284;
880 ok provos@ 884 ok provos@
881 885
882$Id: ChangeLog,v 1.2527 2002/12/23 02:15:57 mouring Exp $ 886$Id: ChangeLog,v 1.2528 2002/12/23 02:22:09 mouring Exp $
diff --git a/scp.c b/scp.c
index 4214e0c53..eb5f23e40 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.94 2002/11/27 17:53:35 markus Exp $"); 78RCSID("$OpenBSD: scp.c,v 1.95 2002/12/05 11:08:35 markus Exp $");
79 79
80#include "xmalloc.h" 80#include "xmalloc.h"
81#include "atomicio.h" 81#include "atomicio.h"
@@ -1058,11 +1058,9 @@ allocbuf(bp, fd, blksize)
1058 run_err("fstat: %s", strerror(errno)); 1058 run_err("fstat: %s", strerror(errno));
1059 return (0); 1059 return (0);
1060 } 1060 }
1061 if (stb.st_blksize == 0) 1061 size = roundup(stb.st_blksize, blksize);
1062 if (size == 0)
1062 size = blksize; 1063 size = blksize;
1063 else
1064 size = blksize + (stb.st_blksize - blksize % stb.st_blksize) %
1065 stb.st_blksize;
1066#else /* HAVE_STRUCT_STAT_ST_BLKSIZE */ 1064#else /* HAVE_STRUCT_STAT_ST_BLKSIZE */
1067 size = blksize; 1065 size = blksize;
1068#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */ 1066#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */