Skip to content

Commit

Permalink
Fix another invalid free of CG(interned_empty_string)
Browse files Browse the repository at this point in the history
Fixes #68214
  • Loading branch information
manuelm committed Feb 7, 2015
1 parent 3550cc5 commit cc13d86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ext/standard/tests/strings/bug68996.phpt
Expand Up @@ -10,7 +10,14 @@ html_errors=1
--FILE--
<?php
fopen("\xfc\x63", "r");
finfo_open(FILEINFO_MIME_TYPE, "\xfc\x63");
?>
--EXPECTF--
<br />
<b>Warning</b>: : failed to open stream: No such file or directory in <b>%sbug68996.php</b> on line <b>2</b><br />
<br />
<b>Warning</b>: : failed to open stream: No such file or directory in <b>%sbug68996.php</b> on line <b>3</b><br />
<br />
<b>Warning</b>: : failed to open stream: No such file or directory in <b>%sbug68996.php</b> on line <b>3</b><br />
<br />
<b>Warning</b>: finfo_open(): in <b>/%sbug68996.php</b> on line <b>3</b><br />
2 changes: 1 addition & 1 deletion main/main.c
Expand Up @@ -935,7 +935,7 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
zend_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) &tmp, sizeof(zval *), NULL);
}
}
efree(buffer);
str_efree(buffer);

php_error(type, "%s", message);
efree(message);
Expand Down

0 comments on commit cc13d86

Please sign in to comment.