Frank Heckenbach <[EMAIL PROTECTED]> wrote:

> The following patch seems to fix the problem since `bufsize', not
> `count' is used in the following `set_next_block_after' call.

Not quite so. The correct way would be:

Index: src/create.c
===================================================================
RCS file: /cvsroot/tar/tar/src/create.c,v
retrieving revision 1.94
diff -p -u -r1.94 create.c
--- src/create.c        7 Apr 2005 17:27:07 -0000       1.94
+++ src/create.c        10 May 2005 14:24:46 -0000
@@ -886,8 +886,6 @@ dump_regular_file (int fd, struct tar_st
        }
       size_left -= count;
 
-      set_next_block_after (blk + (bufsize - 1) / BLOCKSIZE);
-
       if (count != bufsize)
        {
          char buf[UINTMAX_STRSIZE_BOUND];
@@ -903,6 +901,8 @@ dump_regular_file (int fd, struct tar_st
          pad_archive (size_left);
          return dump_status_short;
        }
+
+      set_next_block_after (blk + (bufsize - 1) / BLOCKSIZE);
     }
   return dump_status_ok;
 }

Thanks for spotting the bug.

Regards,
Sergey


_______________________________________________
Bug-tar mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-tar

Reply via email to