]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
Fix savannah bug #63567
authorSergey Poznyakoff <gray@gnu.org>
Mon, 26 Dec 2022 21:44:40 +0000 (23:44 +0200)
committerSergey Poznyakoff <gray@gnu.org>
Mon, 26 Dec 2022 21:46:15 +0000 (23:46 +0200)
* src/buffer.c (short_read): Increase records_read only if a full
record has been read.

src/buffer.c

index 4edaef0b312a5116eec3fb5e4d13576a9a18b873..1eb9dae89f0d40f68e7cd51caeee482936b253e1 100644 (file)
@@ -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.  */