mirror of
https://github.com/php/php-src.git
synced 2025-01-11 05:24:49 +08:00
fix access to already free'ed memory
This commit is contained in:
parent
47514fd793
commit
37960644df
@ -87,12 +87,17 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC)
|
||||
*/
|
||||
|
||||
old_allow_url_fopen_list = PG(allow_url_fopen_list);
|
||||
if (!old_allow_url_fopen_list) {
|
||||
old_allow_url_fopen_list = "";
|
||||
if (old_allow_url_fopen_list) {
|
||||
old_allow_url_fopen_list = estrdup(old_allow_url_fopen_list);
|
||||
} else {
|
||||
old_allow_url_fopen_list = STR_EMPTY_ALLOC();
|
||||
}
|
||||
|
||||
zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), "*", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
|
||||
ctxt = xmlCreateFileParserCtxt(filename);
|
||||
zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), old_allow_url_fopen_list, strlen(old_allow_url_fopen_list), PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
|
||||
efree(old_allow_url_fopen_list);
|
||||
|
||||
if (ctxt) {
|
||||
ctxt->keepBlanks = 0;
|
||||
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;
|
||||
|
Loading…
Reference in New Issue
Block a user