Uploaded image for project: 'Zeta Components'
  1. Zeta Components
  2. ZETACOMP-8

[Archive] Double extraction causes empty file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Archive
    • None
    • Linux, Apache, PHP 5.2, eZ Publish 4.4 alpha6

    Description

      Using extractCurrent() to extract a single file, and then extract() to dump the whole archive, the file I extracted first is now empty (0 byte length).

      I have test code to reproduce this, and a patch that fixes it for me. If the patch is correct, the issue is that zero is incorrectly assumed equal to false.

      I see the issue only with one particular eZ Publish package file (ezpkg/tar.gz) so it could be a problem with that file as well. GNU tar/gz extracts it without problems or warnings, though. I cannot post this file publicly. I can give it to current or former eZ employees, please contact me.

      Attachments

        1. Archive_src_tar_v7.php-trunk.diff
          0.5 kB
          Gunnstein Lye
        2. archive-extract-test-public.php
          0.6 kB
          Gunnstein Lye
        3. tar_v7_truncated_block.tar
          1 kB
          Patrick Allaert
        4. ZETACOMP-8.patch
          2 kB
          Patrick Allaert

        Activity

          People

            derick Derick Rethans
            gunnsteinlye Gunnstein Lye
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: