diff options
Diffstat (limited to 'ext/xsl/xsltprocessor.c')
| -rw-r--r-- | ext/xsl/xsltprocessor.c | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 4ae0bd41cf..dcdbc98852 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -62,10 +62,10 @@ static char *php_xsl_xslt_string_to_xpathexpr(const char *str TSRMLS_DC)  			php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create XPath expression (string contains both quote and double-quotes)");  			return NULL;  		} -		value = (xmlChar*) emalloc (str_len * sizeof(xmlChar) ); +		value = (xmlChar*) safe_emalloc (str_len, sizeof(xmlChar), 0);  		snprintf(value, str_len, "'%s'", string);  	} else { -		value = (xmlChar*) emalloc (str_len * sizeof(xmlChar) ); +		value = (xmlChar*) safe_emalloc (str_len, sizeof(xmlChar), 0);  		snprintf(value, str_len, "\"%s\"", string);  	}  	return (char *) value;  | 
