From: Sergey Poznyakoff Date: Mon, 26 Dec 2022 21:44:40 +0000 (+0200) Subject: Fix savannah bug #63567 X-Git-Tag: v1.35~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e89c7a45eb;p=thirdparty%2Ftar.git Fix savannah bug #63567 * src/buffer.c (short_read): Increase records_read only if a full record has been read. --- diff --git a/src/buffer.c b/src/buffer.c index 4edaef0b..1eb9dae8 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -982,7 +982,8 @@ short_read (size_t status) } record_end = record_start + (record_size - left) / BLOCKSIZE; - records_read++; + if (left == 0) + records_read++; } /* Flush the current buffer to/from the archive. */