summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sp_disable_xxe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sp_disable_xxe.c b/src/sp_disable_xxe.c
index 9ebcbad..113d84b 100644
--- a/src/sp_disable_xxe.c
+++ b/src/sp_disable_xxe.c
@@ -3,10 +3,6 @@
3PHP_FUNCTION(sp_libxml_disable_entity_loader) { RETURN_TRUE; } 3PHP_FUNCTION(sp_libxml_disable_entity_loader) { RETURN_TRUE; }
4 4
5int hook_libxml_disable_entity_loader() { 5int hook_libxml_disable_entity_loader() {
6 zval func_name;
7 zval hmac;
8 zval params[1];
9
10 TSRMLS_FETCH(); 6 TSRMLS_FETCH();
11 7
12// External entities are disabled by default in PHP8+ 8// External entities are disabled by default in PHP8+
@@ -14,6 +10,10 @@ int hook_libxml_disable_entity_loader() {
14 /* Call the php function here instead of re-implementing it is a bit 10 /* Call the php function here instead of re-implementing it is a bit
15 * ugly, but we do not want to introduce compile-time dependencies against 11 * ugly, but we do not want to introduce compile-time dependencies against
16 * libxml. */ 12 * libxml. */
13 zval func_name;
14 zval hmac;
15 zval params[1];
16
17 ZVAL_STRING(&func_name, "libxml_disable_entity_loader"); 17 ZVAL_STRING(&func_name, "libxml_disable_entity_loader");
18 ZVAL_STRING(&params[0], "true"); 18 ZVAL_STRING(&params[0], "true");
19 call_user_function(CG(function_table), NULL, &func_name, &hmac, 1, params); 19 call_user_function(CG(function_table), NULL, &func_name, &hmac, 1, params);