Browse Source

Fixed bug #68901 (use after free)

pull/1063/head
Xinchen Hui 12 years ago
parent
commit
b2cf3f064b
  1. 3
      NEWS
  2. 2
      ext/phar/phar_object.c

3
NEWS

@ -26,6 +26,9 @@ PHP NEWS
. Fixed bug #68750 (PDOMysql with mysqlnd does not allow the usage of
named pipes). (steffenb198@aol.com)
- Phar:
. Fixed bug #68901 (use after free). (bugreports at internot dot info)
- Sqlite3:
. Fixed bug #68260 (SQLite3Result::fetchArray declares wrong
required_num_args). (Julien)

2
ext/phar/phar_object.c

@ -2139,8 +2139,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c
}
its_ok:
if (SUCCESS == php_stream_stat_path(newpath, &ssb)) {
efree(oldpath);
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists and must be unlinked prior to conversion", newpath);
efree(oldpath);
return NULL;
}
if (!phar->is_data) {

Loading…
Cancel
Save