From:             
Operating system: PLD/Linux
PHP version:      5.3.8
Package:          Reproducible crash
Bug Type:         Bug
Bug description:segmentation fault at Zip::extractto()

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');



-- 
Edit bug report at https://bugs.php.net/bug.php?id=60100&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=60100&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=60100&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=60100&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=60100&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60100&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=60100&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=60100&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=60100&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=60100&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=60100&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=60100&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=60100&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=60100&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=60100&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=60100&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60100&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=60100&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=60100&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=60100&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=60100&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=60100&r=mysqlcfg

Reply via email to