diff options
author | kientzle <kientzle@FreeBSD.org> | 2009-02-08 22:02:46 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2009-02-08 22:02:46 +0000 |
commit | 3bdbf535c067627d8e2cc18f2d275ad64d047437 (patch) | |
tree | df025f3a8b5ab22722afdf6cad17495e4149e32a /usr.bin | |
parent | 90862b22bb33b14bbd30c5e9dfc41da6a7686499 (diff) | |
download | FreeBSD-src-3bdbf535c067627d8e2cc18f2d275ad64d047437.zip FreeBSD-src-3bdbf535c067627d8e2cc18f2d275ad64d047437.tar.gz |
When copying file data to the archive, don't write more
than was read. This seems to have only affected the shar
writer, since other formats proactively truncate output
to the originally-advertised size.
PR: bin/131244
MFC after: 7 days
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tar/write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c index 32df3a2..b14aad5 100644 --- a/usr.bin/tar/write.c +++ b/usr.bin/tar/write.c @@ -972,7 +972,7 @@ write_file_data(struct bsdtar *bsdtar, struct archive *a, siginfo_printinfo(bsdtar, progress); bytes_written = archive_write_data(a, bsdtar->buff, - FILEDATABUFLEN); + bytes_read); if (bytes_written < 0) { /* Write failed; this is bad */ bsdtar_warnc(bsdtar, 0, "%s", archive_error_string(a)); |