conjurinc / memtar

In-memory tar archive creation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect Padding When Content Fills a Block Exactly

micahlee opened this issue · comments

When the size of an input file is exactly a factor of 512 (the block size), then an extra block of null bytes is incorrectly appended to the file content, causing the resulting tar archive to be corrupt.

Source Reference:

@io.write "\0" * (512 - size % 512)