components/php-5_3/php-sapi/patches/264_php_20936509.patch
author Craig Mohrman <craig.mohrman@oracle.com>
Tue, 23 Jun 2015 13:44:01 -0700
branchs11u2-sru
changeset 4534 058d7630f55f
permissions -rw-r--r--
20192108 problem in UTILITY/PHP 20231115 problem in UTILITY/PHP 20936509 problem in UTILITY/PHP 20804024 problem in UTILITY/PHP 20804061 problem in UTILITY/PHP 20804135 problem in UTILITY/PHP 20804363 problem in UTILITY/PHP 20804424 problem in UTILITY/PHP 20433657 problem in UTILITY/PHP 20803998 problem in UTILITY/PHP 20804391 problem in UTILITY/PHP
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4534
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     1
CVE-2015-2301
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     2
Community BUG:
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     3
https://bugs.php.net/bug.php?id=68901
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     4
Community CODE:
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     5
http://git.php.net/?p=php-src.git;a=commit;h=b2cf3f064b8f5efef89bb084521b61318c71781b
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     6
Below is the community patch.
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     7
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     8
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
     9
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    10
index 3671054..712795b 100644
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    11
--- a/ext/phar/phar_object.c
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    12
+++ b/ext/phar/phar_object.c
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    13
@@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    14
 	}
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    15
 its_ok:
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    16
 	if (SUCCESS == php_stream_stat_path(newpath, &ssb)) {
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    17
-		efree(oldpath);
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    18
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists and must be unlinked prior to conversion", newpath);
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    19
+		efree(oldpath);
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    20
 		return NULL;
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    21
 	}
058d7630f55f 20192108 problem in UTILITY/PHP
Craig Mohrman <craig.mohrman@oracle.com>
parents:
diff changeset
    22
 	if (!phar->is_data) {