php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21402 Critical bug in PEAR::Archive_Tar
Submitted: 2003-01-03 19:24 UTC Modified: 2003-01-06 16:09 UTC
From: jmcastagnetto@php.net Assigned: vblavet (profile)
Status: Closed Package: PEAR related
PHP Version: 4.3.0 OS: Solaris 8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jmcastagnetto@php.net
New email:
PHP Version: OS:

 

 [2003-01-03 19:24 UTC] jmcastagnetto@php.net
There seems to be a problem in line 658 of Tar.php:


if (strlen($v_stored_filename) > 99) {
          $this->_warning("Stored file name is too long (max. 99) : '$v_stored_filename'");
          fclose($v_file);
          return true;
      }


The "$v_file" var is not defined anywhere before that line in the _addFile() method.

Trying to generate a tarball release from a phpDocumentor snapshot (phpdoc-20030102.tar.gz from http://developer.phpdoc.org/downloads/), generated the following notices and warnings (many repeated lines):

% pear package

...
Notice: Undefined variable:  v_file in Tar.php on line 658

Warning: fclose(): supplied argument is not a valid stream resource in Tar.php on line 658
...
Notice: Undefined variable:  v_file in Tar.php on line 658

Warning: fclose(): supplied argument is not a valid stream resource in Tar.php on line 658
Package /tmp/phpdoc/PhpDocumentor-1.2.0beta1.tgz done

The tarball created is clearly fubared, because trying to do an install just bombs again:

% pear install PhpDocumentor-1.2.0beta1.tgz

warning : bad md5sum for file /export/dredox1/devel_server/php/lib/php/phpDocumentor/phpDocumentor/Converter.inc
warning : bad md5sum for file /export/dredox1/devel_server/php/lib/php/phpDocumentor/phpDocumentor/DescHTML.inc
warning : bad md5sum for file /export/dredox1/devel_server/php/lib/php/phpDocumentor/phpDocumentor/IntermediateParser.inc
warning : bad md5sum for file /export/dredox1/devel_server/php/lib/php/phpDocumentor/phpDocumentor/Io.inc
warning : bad md5sum for file /export/dredox1/devel_server/php/lib/php/phpDocumentor/phpDocumentor/LinkClasses.inc
warning : bad md5sum for file /export/dredox1/devel_server/php/lib/php/phpDocumentor/phpDocumentor/PackagePageElements.inc
failed to write /export/dredox1/devel_server/php/lib/php/phpDocumentor/phpDocumentor/Converters/CHM/default/templates/default/templates/.tmpbasicindex.tpl

Seems like PEAR::Archive_Tar needs a fix badly.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-06 16:10 UTC] vblavet@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

The last CVS of Archive_Tar (pear/Archive_Tar/Archive/Tar.php) correct this bug.
However this does not change the limitation of filename length.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 27 14:03:37 2021 UTC