Edit report at https://bugs.php.net/bug.php?id=60261&edit=1

 ID:                 60261
 Updated by:         [email protected]
 Reported by:        max at cxib dot net
 Summary:            phar dos null pointer
 Status:             Open
 Type:               Bug
-Package:            PECL
+Package:            PHAR related
 Operating System:   linux
 PHP Version:        5.4.0RC1
 Block user comment: N
 Private report:     N

 New Comment:

fix category


Previous Comments:
------------------------------------------------------------------------
[2011-11-11 11:42:44] max at cxib dot net

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 this bug report at https://bugs.php.net/bug.php?id=60261&edit=1

Reply via email to