1
0
mirror of https://github.com/splitbrain/php-archive.git synced 2025-01-29 11:43:06 +01:00

fix filesize calculation in GNU long link tar files

also fixes a warning on PHP 7.1
This commit is contained in:
Andreas Gohr 2017-03-03 15:24:37 +01:00
parent 516553390d
commit aa9ae83c80

View File

@ -573,7 +573,7 @@ class Tar extends Archive
// Handle Long-Link entries from GNU Tar
if ($return['typeflag'] == 'L') {
// following data block(s) is the filename
$filename = trim($this->readbytes(ceil($header['size'] / 512) * 512));
$filename = trim($this->readbytes(ceil($return['size'] / 512) * 512));
// next block is the real header
$block = $this->readbytes(512);
$return = $this->parseHeader($block);