Skip to content

Commit 920a0af

Browse files
laruencesmalyshev
authored andcommitted
Fixed bug #68901 (use after free)
1 parent 9a404df commit 920a0af

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ PHP NEWS
1515
- Sqlite3:
1616
. Fixed bug #66550 (SQLite prepared statement use-after-free). (Sean Heelan)
1717

18+
- Phar:
19+
. Fixed bug #68901 (use after free). (bugreports at internot dot info)
20+
1821
- Postgres:
1922
. Fixed bug #68741 (Null pointer deference) (CVE-2015-1352). (Xinchen Hui)
2023

ext/phar/phar_object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2211,8 +2211,8 @@ static zval *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool c
22112211
}
22122212
its_ok:
22132213
if (SUCCESS == php_stream_stat_path(newpath, &ssb)) {
2214-
efree(oldpath);
22152214
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists and must be unlinked prior to conversion", newpath);
2215+
efree(oldpath);
22162216
return NULL;
22172217
}
22182218
if (!phar->is_data) {

0 commit comments

Comments
 (0)