php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60261 phar dos null pointer
Submitted: 2011-11-11 11:42 UTC Modified: 2011-11-11 21:41 UTC
From: max at cxib dot net Assigned: felipe (profile)
Status: Closed Package: PHAR related
PHP Version: 5.4.0RC1 OS: linux
Private report: No CVE-ID: None
 [2011-11-11 11:42 UTC] 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()


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-11 11:50 UTC] pajoye@php.net
-Package: PECL +Package: PHAR related
 [2011-11-11 11:50 UTC] pajoye@php.net
fix category
 [2011-11-11 21:39 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=319075
Log: - Fixed bug #60261 (phar dos null pointer)
 [2011-11-11 21:41 UTC] felipe@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2011-11-11 21:41 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2012-04-18 09:47 UTC] laruence@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=28d1bc37e2edc8fb8b39337accbc38edde550bd5
Log: - Fixed bug #60261 (phar dos null pointer)
 [2012-07-24 23:38 UTC] rasmus@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=28d1bc37e2edc8fb8b39337accbc38edde550bd5
Log: - Fixed bug #60261 (phar dos null pointer)
 [2013-11-17 09:35 UTC] laruence@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=28d1bc37e2edc8fb8b39337accbc38edde550bd5
Log: - Fixed bug #60261 (phar dos null pointer)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 02:01:27 2024 UTC