Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #77919: Potential UAF in Phar RSHUTDOWN
  Update NEWS
  Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
  Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
This commit is contained in:
Stanislav Malyshev 2019-07-29 13:20:44 -07:00
commit d69894734d
7 changed files with 32 additions and 5 deletions

View file

@ -1990,7 +1990,7 @@ static zend_object *phar_rename_archive(phar_archive_data **sphar, char *ext) /*
char *newname = NULL, *newpath = NULL;
zval ret, arg1;
zend_class_entry *ce;
char *error;
char *error = NULL;
const char *pcr_error;
size_t ext_len = ext ? strlen(ext) : 0;
size_t new_len, oldname_len, phar_ext_len;
@ -2200,6 +2200,8 @@ its_ok:
phar_flush(phar, 0, 0, 1, &error);
if (error) {
zend_hash_str_del(&(PHAR_G(phar_fname_map)), newpath, phar->fname_len);
*sphar = NULL;
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "%s", error);
efree(error);
efree(oldpath);