com php-src: Fix another invalid free of CG(interned_empty _string): ext/standard/tests/strings/bug68996 .phpt main/main.c
| From: | Anatol Belski | Date: | Sat, 07 Feb 2015 18:17:31 +0000 |
| Subject: | com php-src: Fix another invalid free of CG(interned_empty _string): ext/standard/tests/strings/bug68996 .phpt main/main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84699@lists.php.net to get a copy of this message | ||
Commit: cc13d8696fbe08561c3b01ef8d29214fa2b09343
Author: manuel <manuel@mausz.at> Sat, 7 Feb 2015 19:17:31 +0100
Parents: 3550cc5fd975971403d40199427c7598a05b9b08
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cc13d8696fbe08561c3b01ef8d29214fa2b09343
Log:
Fix another invalid free of CG(interned_empty_string)
Fixes #68214
Bugs:
https://bugs.php.net/68214
Changed paths:
M ext/standard/tests/strings/bug68996.phpt
M main/main.c
Diff:
diff --git a/ext/standard/tests/strings/bug68996.phpt b/ext/standard/tests/strings/bug68996.phpt
index 30ba147..af40274 100644
--- a/ext/standard/tests/strings/bug68996.phpt
+++ b/ext/standard/tests/strings/bug68996.phpt
@@ -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 />
diff --git a/main/main.c b/main/main.c
index 331849c..a98aff0 100644
--- a/main/main.c
+++ b/main/main.c
@@ -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);