From:             
Operating system: linux
PHP version:      5.4.0RC1
Package:          PECL
Bug Type:         Bug
Bug description:phar dos null pointer

Description:
------------
<?
/*
1213            }
1214    
1215            zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException,
&error_handling TSRMLS_CC);
1216    
1217    #if defined(PHP_WIN32) || HAVE_SYMLINK
1218            if (!IS_ABSOLUTE_PATH(intern->file_name, 
intern->file_name_len)) {
<=CRASH HERE
1219                    char expanded_path[MAXPATHLEN];
1220    

(gdb) print intern->file_name
$3 = 0x0


where

#define IS_ABSOLUTE_PATH(path, len) \
        (len >= 2 && ((isalpha(path[0]) && path[1] == ':') || IS_UNC_PATH(path,
len)))


*/
$nx = new Phar();
$nx->getLinkTarget();
?>

Test script:
---------------
$nx = new Phar();
$nx->getLinkTarget();

or PharData()


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

Reply via email to