Fix a rounding error in the block size calculation.
Submitted by: tjr
This commit is contained in:
parent
d241a89d5c
commit
b6fd52a01d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107857
@ -76,6 +76,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: scp.c,v 1.91 2002/06/19 00:27:55 deraadt Exp $");
|
||||
RCSID("$FreeBSD$");
|
||||
|
||||
#include "xmalloc.h"
|
||||
#include "atomicio.h"
|
||||
@ -1039,8 +1040,7 @@ allocbuf(bp, fd, blksize)
|
||||
if (stb.st_blksize == 0)
|
||||
size = blksize;
|
||||
else
|
||||
size = blksize + (stb.st_blksize - blksize % stb.st_blksize) %
|
||||
stb.st_blksize;
|
||||
size = roundup(stb.st_blksize, blksize);
|
||||
#else /* HAVE_STRUCT_STAT_ST_BLKSIZE */
|
||||
size = blksize;
|
||||
#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */
|
||||
|
Loading…
Reference in New Issue
Block a user