php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60100 segmentation fault at Zip::extractto()
Submitted: 2011-10-19 20:59 UTC Modified: 2011-10-29 22:06 UTC
From: adamg at pld-linux dot org Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5.3.8 OS: PLD/Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: adamg at pld-linux dot org
New email:
PHP Version: OS:

 

 [2011-10-19 20:59 UTC] adamg at pld-linux dot org
Description:
------------
(gdb) bt
#0  0x00007ffff67a1e34 in free () from /lib64/libc.so.6
#1  0x00007ffff11439ef in php_zip_extract_file (za=0xb01d40, dest=0xaddc28 "test", file=0xb019b0 "admin/", file_len=<value optimized out>)
    at /usr/src/debug/php-5.3.8/ext/zip/php_zip.c:226
#2  0x00007ffff1143d62 in c_ziparchive_extractTo (ht=<value optimized out>, return_value=0xadc7f8, return_value_ptr=<value optimized out>, this_ptr=<value optimized out>,
    return_value_used=<value optimized out>) at /usr/src/debug/php-5.3.8/ext/zip/php_zip.c:2487
#3  0x00007ffff1a648b4 in ?? () from /usr/lib64/php/suhosin.so
#4  0x00007ffff7d18b34 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffef0a3140) at /usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:322
#5  0x00007ffff7cb8fcb in execute (op_array=0xb01c50) at /usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:107
#6  0x00007ffff1a64e64 in ?? () from /usr/lib64/php/suhosin.so
#7  0x00007ffff7d1881c in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffef0a3068) at /usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:344
#8  0x00007ffff7cb8fcb in execute (op_array=0xad9878) at /usr/src/debug/php-5.3.8/Zend/zend_vm_execute.h:107
#9  0x00007ffff1a64e64 in ?? () from /usr/lib64/php/suhosin.so
#10 0x00007ffff7c94a80 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/debug/php-5.3.8/Zend/zend.c:1308
#11 0x00007ffff7c40ff0 in php_execute_script (primary_file=0x7fffffffe440) at /usr/src/debug/php-5.3.8/main/main.c:2299
#12 0x0000000000404969 in main (argc=2, argv=0x7fffffffe5f8) at /usr/src/debug/php-5.3.8/sapi/cli/php_cli.c:1188


Test script:
---------------
<?
function zip_extract($file, $extractPath) {

        $zip = new ZipArchive;
        $res = $zip->open($file);
        if ($res === TRUE) {
                $zip->extractTo($extractPath);
                $zip->close();
                return TRUE;
        } else {
                return FALSE;
        }
}
zip_extract('file11.zip','test');



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-19 21:03 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2011-10-19 21:03 UTC] pajoye@php.net
Please provide the zip file you use to test.
 [2011-10-29 20:30 UTC] adamg at pld-linux dot org
http://adamg.eu/~adamg/zip/

But it seems it was a distro problem caused by a recently applied patch, but I am puting the zip files for reference anyway.
 [2011-10-29 21:19 UTC] pajoye@php.net
a distro problem? Were you not using the PHP src?
 [2011-10-29 22:06 UTC] adamg at pld-linux dot org
-Status: Feedback +Status: Closed
 [2011-10-29 22:06 UTC] adamg at pld-linux dot org
Yes, just checked, does not happen with unpatched php. 
Closing a bug report, sorry about the noise.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 23 07:01:31 2024 UTC